Hello, This may be a simple question that i am posting. I have downloaded the JFreeChart and i was able to play with it without any problem. It is undoubtedly a very good tool. I have faced one problem, when i tried to change the labels on X-Axis which is "Category", i was unsuccessful. I have looked in the super classes of the JFreeChartDemo and it was setting the labels in the class "DefaultCategory*" ( i forgot the name of the class but it starts with "DefaultCategor**" ). I have set it to different names here. After doing this i compile and run it and i am continuosly noticing that although i give it different names it is setting back to the same name "Categroy". I also put break points and i inspected certain objects and i am seeing this happening. Can any one pour some light if there is a way i could change the labels to Customized names.
Thank you.
Sincerely,
Navin.
Changing the Category and Value to different names
RE: Changing the Category and Value to different n
Hi Navin, to custimizing you X-Axis labels to put your own categories, you must to use this constructor.
DefaultCategoryDataSource(String[] seriesNames, Object[] categories, Number[][] data) {
This means that you musto to have the labels for Categories in an Object Array.
And then call DefaultCategoryDataSource(String[] seriesNAmes={"SERIE"}, myCategory, data);
DefaultCategoryDataSource(String[] seriesNames, Object[] categories, Number[][] data) {
This means that you musto to have the labels for Categories in an Object Array.
And then call DefaultCategoryDataSource(String[] seriesNAmes={"SERIE"}, myCategory, data);