I'm trying to create a bunch of graphs dynamically from a database so I need to set the title of the graph from the dataset. The dataset contains the axis name, which I can display easily.
Code: Select all
final CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
Code: Select all
System.out.println(domainAxis.getLabel());
for(int i=0; i<=plot.getRangeAxisCount(); i++){
System.out.println("Axis("+i+") : "+plot.getRangeAxisForDataset(i).getLabel());
}
Management , G = 1.5
Management , P = 1.25
Management , R = 1.75
Management , T = 1.8
I want the Title of the chart to be "Management" in this case.