Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java @ 6876:a071f0a80883
FixA W/Q Diagram: Allow duplicate points. It should work but it doesn't. :-/
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Tue, 20 Aug 2013 19:50:37 +0200 |
parents | 08e3c22500f3 |
children | 1b35b2ddfc28 |
comparison
equal
deleted
inserted
replaced
6875:437856cec419 | 6876:a071f0a80883 |
---|---|
312 if (qwd == null) { | 312 if (qwd == null) { |
313 logger.debug("doReferenceEventsOut: qwds == null"); | 313 logger.debug("doReferenceEventsOut: qwds == null"); |
314 return; | 314 return; |
315 } | 315 } |
316 | 316 |
317 XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), doc); | 317 XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), false, true, doc); |
318 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>(); | 318 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>(); |
319 | 319 |
320 DateFormat dateFormat = DateFormat.getDateInstance( | 320 DateFormat dateFormat = DateFormat.getDateInstance( |
321 DateFormat.SHORT); | 321 DateFormat.SHORT); |
322 | 322 |
323 series.add(qwd.getQ(), qwd.getW()); | 323 series.add(qwd.getQ(), qwd.getW(), false); |
324 | 324 |
325 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( | 325 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( |
326 dateFormat.format(qwd.getDate()), | 326 dateFormat.format(qwd.getDate()), |
327 qwd.getQ(), | 327 qwd.getQ(), |
328 qwd.getW()); | 328 qwd.getW()); |
349 return; | 349 return; |
350 } | 350 } |
351 double[] kms = wqkms.getKms(); | 351 double[] kms = wqkms.getKms(); |
352 for (int i = 0 ; i< kms.length; i++) { | 352 for (int i = 0 ; i< kms.length; i++) { |
353 if (Math.abs(kms[i] - ckm) <= EPSILON) { | 353 if (Math.abs(kms[i] - ckm) <= EPSILON) { |
354 series.add(wqkms.getQ(i), wqkms.getW(i)); | 354 series.add(wqkms.getQ(i), wqkms.getW(i), false); |
355 addAxisSeries(series, YAXIS.W.idx, visible); | 355 addAxisSeries(series, YAXIS.W.idx, visible); |
356 if(visible && ThemeUtil.parseShowPointLabel(theme)) { | 356 if(visible && ThemeUtil.parseShowPointLabel(theme)) { |
357 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>(); | 357 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>(); |
358 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( | 358 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( |
359 title, | 359 title, |
596 } | 596 } |
597 else { | 597 else { |
598 logger.debug("FixWQCurveGenerator: doWQOut: double[][]"); | 598 logger.debug("FixWQCurveGenerator: doWQOut: double[][]"); |
599 double [][] data = (double [][]) wqkms; | 599 double [][] data = (double [][]) wqkms; |
600 | 600 |
601 XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); | 601 XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), false, true, theme); |
602 StyledSeriesBuilder.addPoints(series, data, true); | 602 StyledSeriesBuilder.addPoints(series, data, true); |
603 | 603 |
604 addAxisSeries(series, YAXIS.W.idx, visible); | 604 addAxisSeries(series, YAXIS.W.idx, visible); |
605 } | 605 } |
606 } | 606 } |
614 ) { | 614 ) { |
615 if (qws == null) { | 615 if (qws == null) { |
616 return; | 616 return; |
617 } | 617 } |
618 | 618 |
619 XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); | 619 XYSeries series = new StyledXYSeries( |
620 aaf.getFacetDescription(), | |
621 false, true, | |
622 theme); | |
623 | |
620 List<XYTextAnnotation> textAnnos = | 624 List<XYTextAnnotation> textAnnos = |
621 new ArrayList<XYTextAnnotation>(qws.length); | 625 new ArrayList<XYTextAnnotation>(qws.length); |
622 | 626 |
623 DateFormat dateFormat = DateFormat.getDateInstance( | 627 DateFormat dateFormat = DateFormat.getDateInstance( |
624 DateFormat.SHORT); | 628 DateFormat.SHORT); |
625 | 629 |
626 for (QWI qw: qws) { | 630 for (QWI qw: qws) { |
627 series.add(qw.getQ(), qw.getW()); | 631 series.add(qw.getQ(), qw.getW(), false); |
628 | 632 |
629 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( | 633 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( |
630 dateFormat.format(qw.getDate()), | 634 dateFormat.format(qw.getDate()), |
631 qw.getQ(), | 635 qw.getQ(), |
632 qw.getW()); | 636 qw.getW()); |