Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/common/AbstractProcessor.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 | 1d4262a68f1f |
comparison
equal
deleted
inserted
replaced
9555:ef5754ba5573 | 9556:9b8e8fc1f408 |
---|---|
102 final CallContext context = generator.getContext(); | 102 final CallContext context = generator.getContext(); |
103 final Map<String, String> metaData = bundle.getFacet().getMetaData(); | 103 final Map<String, String> metaData = bundle.getFacet().getMetaData(); |
104 | 104 |
105 final Artifact artifact = bundle.getArtifact(); | 105 final Artifact artifact = bundle.getArtifact(); |
106 | 106 |
107 final StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); | 107 final String facetDescription = bundle.getFacetDescription(); |
108 final String facetName = bundle.getFacetName(); | |
109 | |
110 final StyledXYSeries series = new StyledXYSeries(facetName, facetDescription, theme); | |
108 series.putMetaData(metaData, artifact, context); | 111 series.putMetaData(metaData, artifact, context); |
109 | |
110 final String facetName = bundle.getFacetName(); | |
111 | 112 |
112 final double[][] filteredPoints = filterPoints(points, context, artifact, facetName); | 113 final double[][] filteredPoints = filterPoints(points, context, artifact, facetName); |
113 | 114 |
114 if (gapDistance == null) | 115 if (gapDistance == null) |
115 StyledSeriesBuilder.addPoints(series, filteredPoints, true); | 116 StyledSeriesBuilder.addPoints(series, filteredPoints, true); |
127 final CallContext context = generator.getContext(); | 128 final CallContext context = generator.getContext(); |
128 final Map<String, String> metaData = bundle.getFacet().getMetaData(); | 129 final Map<String, String> metaData = bundle.getFacet().getMetaData(); |
129 | 130 |
130 final Artifact artifact = bundle.getArtifact(); | 131 final Artifact artifact = bundle.getArtifact(); |
131 | 132 |
132 final StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); | 133 final String facetName = bundle.getFacetName(); |
134 final String facetDescription = bundle.getFacetDescription(); | |
135 | |
136 final StyledXYSeries series = new StyledXYSeries(facetName, facetDescription, theme); | |
133 series.putMetaData(metaData, artifact, context); | 137 series.putMetaData(metaData, artifact, context); |
134 | |
135 final String facetName = bundle.getFacetName(); | |
136 | 138 |
137 // Create WQKms to use the step points method | 139 // Create WQKms to use the step points method |
138 // REMARK: must have any values in w array; not sure whether the name is needed | 140 // REMARK: must have any values in w array; not sure whether the name is needed |
139 final WQKms wqkms = new WQKms(points[0], points[1], points[1], facetName); | 141 final WQKms wqkms = new WQKms(points[0], points[1], points[1], facetName); |
140 | 142 |
148 protected final String buildSeriesForTkh(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, | 150 protected final String buildSeriesForTkh(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, |
149 final boolean visible) { | 151 final boolean visible) { |
150 | 152 |
151 final AbstractTkhCalculationResult data = (AbstractTkhCalculationResult) getResult(generator, bundle); | 153 final AbstractTkhCalculationResult data = (AbstractTkhCalculationResult) getResult(generator, bundle); |
152 | 154 |
153 final StyledXYSeries seriesUp = new StyledXYSeries(bundle.getFacetDescription(), theme); | 155 final String facetName = bundle.getFacetName(); |
156 final String facetDescription = bundle.getFacetDescription(); | |
157 | |
158 final StyledXYSeries seriesUp = new StyledXYSeries(facetName, facetDescription, theme); | |
154 final double[][] pointsUp = data.getTkhUpPoints(); | 159 final double[][] pointsUp = data.getTkhUpPoints(); |
155 StyledSeriesBuilder.addPoints(seriesUp, pointsUp, true); | 160 StyledSeriesBuilder.addPoints(seriesUp, pointsUp, true); |
156 | 161 |
157 // REMARK: we add " " because the description is misused as id, which must be unique. | 162 // REMARK: we add " " because the description is misused as id, which must be unique. |
158 final StyledXYSeries seriesDown = new StyledXYSeries(bundle.getFacetDescription() + " ", theme); | 163 final StyledXYSeries seriesDown = new StyledXYSeries(facetName, facetDescription + " ", theme); |
159 final double[][] pointsDown = data.getTkhDownPoints(); | 164 final double[][] pointsDown = data.getTkhDownPoints(); |
160 StyledSeriesBuilder.addPoints(seriesDown, pointsDown, true); | 165 StyledSeriesBuilder.addPoints(seriesDown, pointsDown, true); |
161 | 166 |
162 final StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme); | 167 final StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(facetName, theme); |
163 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); | 168 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); |
164 area.addSeries(seriesUp); | 169 area.addSeries(seriesUp); |
165 area.addSeries(seriesDown); | 170 area.addSeries(seriesDown); |
166 | 171 |
167 generator.addAxisDataset(area, getAxisName(), visible); | 172 generator.addAxisDataset(area, getAxisName(), visible); |