Mercurial > hg > release > thermostat-1.0
changeset 413:05d1331db40e
Fix heap charts.
Reviewed-by: omajid
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-June/001968.html
PR 944
author | Roman Kennke <rkennke@redhat.com> |
---|---|
date | Thu, 21 Jun 2012 17:38:44 +0200 |
parents | 5f58e1af2791 |
children | 79c07f5c005a |
files | client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/chart/OverviewChart.java |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/chart/OverviewChart.java Thu Jun 21 17:25:37 2012 +0200 +++ b/client/heapdumper/src/main/java/com/redhat/thermostat/client/heap/chart/OverviewChart.java Thu Jun 21 17:38:44 2012 +0200 @@ -47,7 +47,6 @@ import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.DateAxis; import org.jfree.chart.axis.NumberAxis; -import org.jfree.chart.axis.NumberTickUnit; import org.jfree.chart.axis.TickUnits; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.XYPlot; @@ -74,9 +73,9 @@ this.xAxis = xAxis; this.yAxis = yAxis; - total = new TimeSeries(""); + total = new TimeSeries("total"); total.setDescription("total"); - used = new TimeSeries(""); + used = new TimeSeries("used"); used.setDescription("used"); } @@ -86,7 +85,7 @@ TimeSeriesCollection dataset = new TimeSeriesCollection(); dataset.addSeries(total); dataset.addSeries(used); - + JFreeChart chart = ChartFactory.createTimeSeriesChart( title, xAxis, @@ -133,6 +132,7 @@ yAxis.setStandardTickUnits(tickUnits); yAxis.setRangeType(RangeType.POSITIVE); yAxis.setAutoRangeMinimumSize(10); + yAxis.setAutoRange(true); return chart; }