From: luukkainen Date: Thu, 11 Sep 2014 14:22:41 +0000 (+0000) Subject: fixes #5289 X-Git-Tag: v1.29.0~182 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=f9f4a857eb07ba1e290e4db667652d1b23c99427;p=simantics%2Fsysdyn.git fixes #5289 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30258 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java index df619550..b8d74bb0 100644 --- a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java +++ b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java @@ -91,11 +91,10 @@ public class FilteringCategoryDataset extends AbstractDataset implements org.jfr if (Math.abs(value.doubleValue()) > total) { filtered.addValue(value, (Comparable) row, (Comparable)column); } else { - // TODO : what is proper way to handle negative values? - other += Math.abs(value.doubleValue()); + other += value.doubleValue(); } } - if (other > 0.0) { + if (Math.abs(other) > 0.0) { filtered.addValue(other, this.other, (Comparable)column); } } @@ -116,11 +115,10 @@ public class FilteringCategoryDataset extends AbstractDataset implements org.jfr if (Math.abs(value.doubleValue()) > total) { filtered.addValue(value, (Comparable) row, (Comparable)column); } else { - // TODO : what is proper way to handle negative values? - other += Math.abs(value.doubleValue()); + other += value.doubleValue(); } } - if (other > 0.0) { + if (Math.abs(other) > 0.0) { filtered.addValue(other, (Comparable)row, this.other); } }