From a57df554d4cfe9f5410845bc5432b207a79b2c23 Mon Sep 17 00:00:00 2001 From: ElMuto Date: Mon, 4 Apr 2016 13:35:42 +0200 Subject: [PATCH] divide percentage by 100 --- src/main/de/linearbits/subframe/graph/Series2D.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/de/linearbits/subframe/graph/Series2D.java b/src/main/de/linearbits/subframe/graph/Series2D.java index f6da92a..3d4a354 100644 --- a/src/main/de/linearbits/subframe/graph/Series2D.java +++ b/src/main/de/linearbits/subframe/graph/Series2D.java @@ -61,7 +61,7 @@ public Series2D(CSVFile file, } /** - * Creates a series by selecting rows and combining some values (x = x1 - x2) + * Creates a series by selecting rows and combining some values (x = (x1 - x2) / 100) * * @param file * @param selector @@ -82,7 +82,7 @@ public Series2D(CSVFile file, if (selector.isSelected(line)) { String x1 = csvline.get(x1Field.category, x1Field.measure); String x2 = csvline.get(x2Field.category, x2Field.measure); - Double x = Double.parseDouble(x1)- Double.parseDouble(x2); + Double x = (Double.parseDouble(x1)- Double.parseDouble(x2)) / 100d; String y = csvline.get(yField.category, yField.measure); if (!Double.isInfinite(Double.parseDouble(y))) data.add(new Point2D(x.toString(), y));