annotate artifacts/src/main/java/org/dive4elements/river/exports/DischargeGenerator.java @ 9123:1cc7653ca84f

Cleanup of ChartGenerator and ChartGenerator2 code. Put some of the copy/pasted code into a common abstraction.
author gernotbelger
date Tue, 05 Jun 2018 19:21:16 +0200
parents e6d0fc817e20
children ef5754ba5573
rev   line source
8165
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2014 by Bundesanstalt für Gewässerkunde
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
3 *
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
7 */
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
8 package org.dive4elements.river.exports;
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
9
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
10 import java.awt.Font;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
11
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
12 import org.apache.log4j.Logger;
8353
a82f24b773e7 Use i18n string for w in cm axis.
Raimund Renkert <rrenkert@intevation.de>
parents: 8338
diff changeset
13 import org.dive4elements.river.artifacts.resources.Resources;
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
14 import org.dive4elements.river.exports.injector.InjectorConstants;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
15 import org.dive4elements.river.jfree.AxisDataset;
8338
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
16 import org.dive4elements.river.jfree.DoubleBounds;
8738
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
17
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
18 import org.jfree.chart.axis.NumberAxis;
8738
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
19 import org.jfree.chart.axis.ValueAxis;
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
20 import org.jfree.chart.plot.XYPlot;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
21 import org.jfree.data.Range;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
22
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
23 public class DischargeGenerator
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
24 extends DiagramGenerator
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
25 implements InjectorConstants
8165
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
26 {
8323
c44775cd79f2 Use right logger in DischargeGenerator.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8320
diff changeset
27 private static Logger log = Logger.getLogger(DischargeGenerator.class);
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
28
8353
a82f24b773e7 Use i18n string for w in cm axis.
Raimund Renkert <rrenkert@intevation.de>
parents: 8338
diff changeset
29 private String I18N_AXIS_LABEL = "chart.discharge.curve.yaxis.cm.label";
a82f24b773e7 Use i18n string for w in cm axis.
Raimund Renkert <rrenkert@intevation.de>
parents: 8338
diff changeset
30
8571
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
31 private int wAxisIndex;
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
32 private int wInCmAxisIndex;
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
33 double pnpValue;
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
34
8165
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
35 public DischargeGenerator() {
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
36 }
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
37
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
38 @Override
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
39 public void addDatasets(XYPlot plot) {
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
40 super.addDatasets(plot);
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
41
9123
1cc7653ca84f Cleanup of ChartGenerator and ChartGenerator2 code. Put some of the copy/pasted code into a common abstraction.
gernotbelger
parents: 8738
diff changeset
42 Object pnp = getContext().getContextValue(PNP);
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
43 if (!(pnp instanceof Number)) {
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
44 return;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
45 }
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
46
8571
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
47 pnpValue = ((Number)pnp).doubleValue();
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
48
8571
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
49 wAxisIndex = diagramAttributes.getAxisIndex("W");
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
50 if (wAxisIndex == -1) {
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
51 log.warn("No W axis found.");
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
52 return;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
53 }
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
54
9123
1cc7653ca84f Cleanup of ChartGenerator and ChartGenerator2 code. Put some of the copy/pasted code into a common abstraction.
gernotbelger
parents: 8738
diff changeset
55 AxisDataset data = getDatasets().get(wAxisIndex);
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
56 if (data == null) {
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
57 // No W axis
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
58 return;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
59 }
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
60
8330
e87a993c6611 Avoid NPE if no dataset is activated in theme list.
"Tom Gottfried <tom@intevation.de>"
parents: 8324
diff changeset
61 if (data.getRange() == null) {
e87a993c6611 Avoid NPE if no dataset is activated in theme list.
"Tom Gottfried <tom@intevation.de>"
parents: 8324
diff changeset
62 // No active datasets
e87a993c6611 Avoid NPE if no dataset is activated in theme list.
"Tom Gottfried <tom@intevation.de>"
parents: 8324
diff changeset
63 return;
e87a993c6611 Avoid NPE if no dataset is activated in theme list.
"Tom Gottfried <tom@intevation.de>"
parents: 8324
diff changeset
64 }
e87a993c6611 Avoid NPE if no dataset is activated in theme list.
"Tom Gottfried <tom@intevation.de>"
parents: 8324
diff changeset
65
8338
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
66 Range axisRange = inCm(
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
67 plot.getRangeAxis(wAxisIndex).getRange(),
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
68 pnpValue
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
69 );
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
70 Range dataRange = inCm(data.getRange(), pnpValue);
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
71
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
72 // Do we have an index for W in cm?
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
73 NumberAxis wInCmAxis = createWinCMAxis(wAxisIndex);
8338
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
74 wInCmAxis.setRange(axisRange);
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
75
8571
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
76 wInCmAxisIndex = plot.getRangeAxisCount();
8338
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
77 plot.setRangeAxis(wInCmAxisIndex, wInCmAxis);
ac7cb15e1946 Scale second W-axis in cm according to first axis, which is expanded relative to the data, and set bounds for zooming purposes (plus a bit of cleanup in DiagramGenerator).
"Tom Gottfried <tom@intevation.de>"
parents: 8330
diff changeset
78 combineYBounds(new DoubleBounds(dataRange), wInCmAxisIndex);
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
79 }
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
80
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
81 private static Range inCm(Range r, double pnpValue) {
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
82 double l = r.getLowerBound();
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
83 double u = r.getUpperBound();
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
84 l = (l - pnpValue)*100d;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
85 u = (u - pnpValue)*100d;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
86 return new Range(l, u);
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
87 }
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
88
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
89 private NumberAxis createWinCMAxis(int wAxisIndex) {
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
90
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
91 Font labelFont = new Font(
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
92 DEFAULT_FONT_NAME,
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
93 Font.BOLD,
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
94 getYAxisFontSize(wAxisIndex));
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
95
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
96 String axisName = "W.in.cm";
9123
1cc7653ca84f Cleanup of ChartGenerator and ChartGenerator2 code. Put some of the copy/pasted code into a common abstraction.
gernotbelger
parents: 8738
diff changeset
97 String axisLabel = msg( I18N_AXIS_LABEL, "W [cm]" );
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
98
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
99 IdentifiableNumberAxis axis = new IdentifiableNumberAxis(
8353
a82f24b773e7 Use i18n string for w in cm axis.
Raimund Renkert <rrenkert@intevation.de>
parents: 8338
diff changeset
100 axisName, axisLabel);
8320
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
101
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
102 axis.setAutoRangeIncludesZero(false);
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
103 axis.setLabelFont(labelFont);
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
104 axis.setTickLabelFont(labelFont);
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
105
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
106 return axis;
b1303070c050 Generate a W in CM axis if there are W data.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8165
diff changeset
107 }
8571
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
108
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
109 /** We need to override this to keep both axis synced. */
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
110 @Override
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
111 protected void autoZoom(XYPlot plot) {
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
112 super.autoZoom(plot);
8738
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
113
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
114 ValueAxis wAxis = plot.getRangeAxis(wAxisIndex);
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
115 if (wAxis instanceof IdentifiableNumberAxis) {
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
116 IdentifiableNumberAxis idA = (IdentifiableNumberAxis)wAxis;
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
117 Range fixedRange = getRangeForAxisFromSettings(idA.getId());
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
118 if (fixedRange == null) {
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
119 return;
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
120 }
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
121
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
122 log.debug("Adjusting helper centimeter axis to fixed range.");
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
123 Range adjustedRange = inCm(
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
124 fixedRange,
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
125 pnpValue
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
126 );
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
127 IdentifiableNumberAxis wInCmAxis=
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
128 (IdentifiableNumberAxis) plot.getRangeAxis(wInCmAxisIndex);
e6d0fc817e20 (issue1798) Handle the case when there are no data in the diagram.
Tom Gottfried <tom@intevation.de>
parents: 8571
diff changeset
129 wInCmAxis.setRange(adjustedRange);
8571
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
130 }
bc803f4b6784 (issue1798) Adjust WinCM according to W in NHN axis on explicit zoom
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8353
diff changeset
131 }
8165
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
132 }
cfb3a4d0c637 Added new diagramm generator for Q symmetry.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
133 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org