Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineProcessor.java @ 9556:9b8e8fc1f408
Use facetName in all processors as themeType for legend aggregation.
author | gernotbelger |
---|---|
date | Tue, 23 Oct 2018 16:26:58 +0200 |
parents | 853f2dafc16e |
children |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineProcessor.java Tue Oct 23 16:26:48 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineProcessor.java Tue Oct 23 16:26:58 2018 +0200 @@ -169,7 +169,9 @@ @Override protected String generateSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, final boolean visible) { - if (bundle.getFacetName().equals(FACET_SALIX_SCENARIO_FILTERED) || bundle.getFacetName().equals(FACET_SALIX_SCENARIO_RAW)) { + final String facetName = bundle.getFacetName(); + + if (facetName.equals(FACET_SALIX_SCENARIO_FILTERED) || facetName.equals(FACET_SALIX_SCENARIO_RAW)) { final CallContext context = generator.getContext(); final SalixLineCalculationResult data = (SalixLineCalculationResult) bundle.getData(context); final int dataIndex = ((SalixScenarioResultFacet) bundle.getFacet()).getDataIndex(); @@ -177,10 +179,10 @@ return buildSeriesForPoints(scenarioPoints, generator, bundle, theme, visible, GAP_DISTANCE); } - if (bundle.getFacetName().equals(FACET_SALIX_RANK)) { + if (facetName.equals(FACET_SALIX_RANK)) { final CallMeta meta = generator.getContext().getMeta(); - final StripedAreaDataset dataset = new StripedAreaDataset(theme); + final StripedAreaDataset dataset = new StripedAreaDataset(facetName, theme); dataset.addStripe(new Stripe(getSimpleMsg("uinfo_salix_rank.excellent", meta), Color.decode("#00B0F0"), -0.3, 0.3)); dataset.addStripe(new Stripe(getSimpleMsg("uinfo_salix_rank.good", meta), Color.decode("#00B050"), 0.3, 0.5)); dataset.addStripe(new Stripe(getSimpleMsg("uinfo_salix_rank.moderate", meta), Color.decode("#FFFF00"), 0.5, 1.0)); @@ -192,7 +194,7 @@ return null; } - return buildSeriesForType(generator, bundle, theme, visible, doGetType(bundle.getFacetName()), GAP_DISTANCE); + return buildSeriesForType(generator, bundle, theme, visible, doGetType(facetName), GAP_DISTANCE); } private String getSimpleMsg(final String code, final CallMeta meta) {