I have the following values to be shown in a BAR chart in my Java web application. 9.46373791E8 9.45942547E8 9.45559945E8 9.45187023E8 9.44856693E8 9.44417826E8 9.44007878E8
As u can see the values are really close and have minor differences. When i generate a bar chart using Jfreechart, all the bars appear almost the same height and there is no way of telling the difference visually. So i want to change the (0,0) to (0,9)so that x axis is at number 9 on y axis. I still want to show the real values that the bars represent somewhere on top of the bar.
please suggest ideas. i tried the below but it didnt work
Double d=(double) 9;
ValueAxis rangeAxis = plot.getRangeAxis();
rangeAxis.setLowerMargin(d);
Edit: This is my original program for your reference
JFreeChart chart =
ChartFactory.createBarChart(
title,
"File Date",
"File Size",
dataset,
PlotOrientation.VERTICAL,
true,
true,
false);
chart.setBackgroundPaint(Color.white);
// Set the background color of the chart
chart.getTitle().setPaint(Color.DARK_GRAY);
chart.setBorderVisible(true);
// Adjust the color of the title
CategoryPlot plot = chart.getCategoryPlot();
plot.getRangeAxis().setLowerBound(d);
// Get the Plot object for a bar graph
plot.setBackgroundPaint(Color.white);
plot.setRangeGridlinePaint(Color.blue);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.decode("#00008B"));