Hi
I have to diasplay the series lables on the x axis below the bars. is this possible? I have given my code below:
In the code below, it is supposed to show two bars for the years 2002 and 2001. I want these to be displayed below the 3D bars. Is this possible
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
OutputStream out = response.getOutputStream();
String year = request.getParameter("year");
String client = request.getParameter("client");
String type = request.getParameter("type");
DefaultCategoryDataset dataset = getData(year,client,type);
String title = "Comparison Report for " + client; // + title;
JFreeChart chart = ChartFactory.createVerticalBarChart3D(
title,
"",
"Total Calls",
dataset,
true
);
chart.setBackgroundPaint(Color.white);
Plot newPlot = chart.getPlot();
Paint[] myPaint = new Paint[] { new Color(130,0,121),new Color(0,108,130),new Color(127,130,0) };
newPlot.setSeriesPaint(myPaint);
response.setContentType("image/jpeg");
ChartUtilities.writeChartAsPNG(out, chart, 500, 400);
}
When I use
CategoryPlot categoryPlot = chart.getCategoryPlot();
categoryPlot.setValueLabelsVisible(true);
it throws an exception - java.lang.NoSuchMethodError: com.jrefinery.chart.CategoryPlot.setValueLabelsVisible(Z)V
Thanks
Sruti
Values on the chart
Re: Values on the chart
Are you using 0.9.4 or an earlier version?
Regards,
Dave Gilbert
Regards,
Dave Gilbert
Re: Values on the chart
Hi David
Can you pls have a look at this and let me know whether what I asked in my original post can be done ?
I would really appreciate your response.
Thank you
Sruti
Can you pls have a look at this and let me know whether what I asked in my original post can be done ?
I would really appreciate your response.
Thank you
Sruti