I have the following piece of code for creating the category data:
String[] seriesNames = new String[] {"Usage"};
String[] categories = new String[] {"0","10","20","30","40","50",
"60","70","80","90","100"};
Number[][] dataArray = new Integer[][] {
{new Integer(0), new Integer(30),new Integer(50),new Integer(65),
new Integer(80),new Integer(85),new Integer(90),
new Integer(93),new Integer(96),new Integer(99),new Integer(100)}
};
return new DefaultCategoryDataset(seriesNames, categories,dataArray);
I need to have my graph start from the beginning(intersection of X,Y axes starting from 0), I however notice that the 0 on the X axis does not match up with the 0 on the Y axis. How can I fix this to start from the beginning?
0's of X and Y coordinates do not intersect
Re: 0's of X and Y coordinates do not intersect
You should probably use XYDataset rather than CategoryDataset for your data, since the domain appears to be numerical.
Regards,
DG.
Regards,
DG.