Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/process/FixDeltaWAProcessor.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 | d8e753d0fdb9 |
children |
comparison
equal
deleted
inserted
replaced
9555:ef5754ba5573 | 9556:9b8e8fc1f408 |
---|---|
40 ThemeDocument theme, | 40 ThemeDocument theme, |
41 boolean visible) { | 41 boolean visible) { |
42 CallContext context = generator.getContext(); | 42 CallContext context = generator.getContext(); |
43 Object data = bundle.getData(context); | 43 Object data = bundle.getData(context); |
44 | 44 |
45 XYSeries series = new StyledXYSeries( | 45 final String facetName = bundle.getFacetName(); |
46 | |
47 XYSeries series = new StyledXYSeries(facetName, | |
46 bundle.getFacetDescription(), theme); | 48 bundle.getFacetDescription(), theme); |
47 | 49 |
48 // Handle WKms data. | 50 // Handle WKms data. |
49 WKms wkms = (WKms) data; | 51 WKms wkms = (WKms) data; |
50 | 52 |
52 generator.addAxisSeries(series, axisName, visible); | 54 generator.addAxisSeries(series, axisName, visible); |
53 | 55 |
54 // If a "band around the curve shall be drawn, add according area. | 56 // If a "band around the curve shall be drawn, add according area. |
55 double bandWidth = theme.parseBandWidth(); | 57 double bandWidth = theme.parseBandWidth(); |
56 if (bandWidth > 0 ) { | 58 if (bandWidth > 0 ) { |
57 XYSeries seriesDown = new StyledXYSeries( | 59 XYSeries seriesDown = new StyledXYSeries(facetName, |
58 "band " + bundle.getFacetDescription(), false, theme); | 60 "band " + bundle.getFacetDescription(), false, theme); |
59 XYSeries seriesUp = new StyledXYSeries( | 61 XYSeries seriesUp = new StyledXYSeries(facetName, |
60 bundle.getFacetDescription()+"+/-"+bandWidth, false, theme); | 62 bundle.getFacetDescription()+"+/-"+bandWidth, false, theme); |
61 StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth); | 63 StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth); |
62 StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth); | 64 StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth); |
63 | 65 |
64 StyledAreaSeriesCollection area = | 66 StyledAreaSeriesCollection area = |
65 new StyledAreaSeriesCollection(theme); | 67 new StyledAreaSeriesCollection(facetName, theme); |
66 area.addSeries(seriesUp); | 68 area.addSeries(seriesUp); |
67 area.addSeries(seriesDown); | 69 area.addSeries(seriesDown); |
68 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); | 70 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); |
69 generator.addAxisDataset(area, axisName, visible); | 71 generator.addAxisDataset(area, axisName, visible); |
70 } | 72 } |