]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
fixes #5289
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 11 Sep 2014 14:22:41 +0000 (14:22 +0000)
committerluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 11 Sep 2014 14:22:41 +0000 (14:22 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30258 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java

index df619550fa82eadcc2d4a148ac58313856fe6794..b8d74bb0cea2e4c3241042d9e22ddb901dde1432 100644 (file)
@@ -91,11 +91,10 @@ public class FilteringCategoryDataset extends AbstractDataset implements org.jfr
                                        if (Math.abs(value.doubleValue()) > total) {\r
                                                filtered.addValue(value, (Comparable) row, (Comparable)column);\r
                                        } else {\r
-                                               // TODO : what is proper way to handle negative values?\r
-                                               other += Math.abs(value.doubleValue()); \r
+                                               other += value.doubleValue(); \r
                                        }\r
                                }\r
-                               if (other > 0.0) {\r
+                               if (Math.abs(other) > 0.0) {\r
                                        filtered.addValue(other, this.other, (Comparable)column);\r
                                }\r
                        }\r
@@ -116,11 +115,10 @@ public class FilteringCategoryDataset extends AbstractDataset implements org.jfr
                                        if (Math.abs(value.doubleValue()) > total) {\r
                                                filtered.addValue(value, (Comparable) row, (Comparable)column);\r
                                        } else {\r
-                                               // TODO : what is proper way to handle negative values?\r
-                                               other += Math.abs(value.doubleValue()); \r
+                                               other += value.doubleValue(); \r
                                        }\r
                                }\r
-                               if (other > 0.0) {\r
+                               if (Math.abs(other) > 0.0) {\r
                                        filtered.addValue(other, (Comparable)row, this.other);\r
                                }\r
                        }\r