changeset 1693:88d3eff7a6df

Host-memory chart should not show negative values in the y-axix PR2412 Reviewed-by: omajid Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-June/013954.html
author Jie Kang <jkang@redhat.com>
date Mon, 08 Jun 2015 11:18:07 -0400
parents 507c6521cbc4
children 1bd15e2be981
files host-memory/client-swing/src/main/java/com/redhat/thermostat/host/memory/client/swing/internal/HostMemoryPanel.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/host-memory/client-swing/src/main/java/com/redhat/thermostat/host/memory/client/swing/internal/HostMemoryPanel.java	Tue May 26 09:55:40 2015 -0400
+++ b/host-memory/client-swing/src/main/java/com/redhat/thermostat/host/memory/client/swing/internal/HostMemoryPanel.java	Mon Jun 08 11:18:07 2015 -0400
@@ -58,6 +58,7 @@
 import org.jfree.chart.JFreeChart;
 import org.jfree.chart.axis.NumberAxis;
 import org.jfree.chart.renderer.xy.XYItemRenderer;
+import org.jfree.data.RangeType;
 import org.jfree.data.time.FixedMillisecond;
 import org.jfree.data.time.RegularTimePeriod;
 import org.jfree.data.time.TimeSeries;
@@ -315,6 +316,7 @@
 
         NumberAxis rangeAxis = (NumberAxis) chart.getXYPlot().getRangeAxis();
         rangeAxis.setAutoRangeMinimumSize(100);
+        rangeAxis.setRangeType(RangeType.POSITIVE);
 
         return chart;
     }