comparison artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java @ 8778:bbf6cf555e89

Tidied.
author Tom Gottfried <tom@intevation.de>
date Thu, 03 Dec 2015 12:20:03 +0100
parents e4606eae8ea5
children 5e38e2924c07
comparison
equal deleted inserted replaced
8777:9d2a0827ec03 8778:bbf6cf555e89
676 * @param bounds The whole range specified by a dataset. 676 * @param bounds The whole range specified by a dataset.
677 * @param x A user defined range (null permitted). 677 * @param x A user defined range (null permitted).
678 * 678 *
679 * @return true, if a zoom range was specified, otherwise false. 679 * @return true, if a zoom range was specified, otherwise false.
680 */ 680 */
681 protected boolean zoom(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) { 681 protected boolean zoom(
682 XYPlot plot,
683 ValueAxis axis,
684 Bounds bounds,
685 Range x
686 ) {
682 687
683 if (bounds == null) { 688 if (bounds == null) {
684 return false; 689 return false;
685 } 690 }
686 691
706 */ 711 */
707 protected Bounds calculateZoom(Bounds bounds, Range range) { 712 protected Bounds calculateZoom(Bounds bounds, Range range) {
708 double min = bounds.getLower().doubleValue(); 713 double min = bounds.getLower().doubleValue();
709 double max = bounds.getUpper().doubleValue(); 714 double max = bounds.getUpper().doubleValue();
710 715
711 if (log.isDebugEnabled()) { 716 log.debug("Minimum is: " + min);
712 log.debug("Minimum is: " + min); 717 log.debug("Maximum is: " + max);
713 log.debug("Maximum is: " + max); 718 log.debug("Lower zoom is: " + range.getLowerBound());
714 log.debug("Lower zoom is: " + range.getLowerBound()); 719 log.debug("Upper zoom is: " + range.getUpperBound());
715 log.debug("Upper zoom is: " + range.getUpperBound());
716 }
717 720
718 double diff = max > min ? max - min : min - max; 721 double diff = max > min ? max - min : min - max;
719 722
720 DoubleBounds computed = new DoubleBounds( 723 DoubleBounds computed = new DoubleBounds(
721 min + range.getLowerBound() * diff, 724 min + range.getLowerBound() * diff,

http://dive4elements.wald.intevation.org