I want to product a vertical bar chart to show no. of mail send by each person - where y-axis show "No. of mail" and x-axis show the "Each person name" (it contains about 40 people)
It seems that CategoryDataset is suitable for me in this case, but I am not sure which class is used to add the person names in x-axis.. and it seems that there is not enough space to print out all 40 person name in the x-axis.
I want to find some sample code to see how to do this.
Do anyone can help??
Many Thanks
Carrie
Problem on create category vertical bar chart
Re: Problem on create category vertical bar chart
Just to enhance my question. I found in this forum that XYPlot allow to print the x-axis vertically.
XYPlot plot= myChart.getXYPlot();
HorizontalDataAxis axis = (HorizontalDataAxis) plot.getDomainAxis();
axis.setVerticalTickLabels(true);
Is it possible to do it in my case??
Many Thanks
Carrie
XYPlot plot= myChart.getXYPlot();
HorizontalDataAxis axis = (HorizontalDataAxis) plot.getDomainAxis();
axis.setVerticalTickLabels(true);
Is it possible to do it in my case??
Many Thanks
Carrie
Re: Problem on create category vertical bar chart
Yes, a similar approach works:
CategoryPlot plot = myChart.getCategoryPlot();
HorizontalCategoryAxis axis = (HorizontalCategoryAxis) plot.getDomainAxis();
axis.setVerticalTickLabels(true);
Regards,
Dave Gilbert
CategoryPlot plot = myChart.getCategoryPlot();
HorizontalCategoryAxis axis = (HorizontalCategoryAxis) plot.getDomainAxis();
axis.setVerticalTickLabels(true);
Regards,
Dave Gilbert