bfollek Posted January 29, 2008 Report Share Posted January 29, 2008 In a line graph, I get a gap between the Y-Axis and the start of the line, and a gap between the end of the line and the rightmost vertical border of the graph (the inner border). How can I eliminate these gaps? Link to comment Share on other sites More sharing options...
maximop Posted January 31, 2008 Report Share Posted January 31, 2008 You need to have an XY chart; in other words, your chart right now is using a categorical axis and in order to get the desired graph, your chart needs to use a numerical axis. To do this, you can simple set XValues for your chart. You can do something like the following: chart1.openData(COD.XVALUES, 1, 10); chart1.openData(COD.VALUES, 1, 10); int i = 0; for (int j = 0;j<10;j++) { chart1.getValue().setItem(0, j, r.nextDouble() * 50); chart1.getXValue().setItem(0, j, i); i++; } chart1.closeData(COD.VALUES); chart1.closeData(COD.XVALUES); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.