I'm trying to create a chart with JFreeChart.
I need it to have blue lines, square markers white background and to show the values above each marker. but I need it to be very very simple. The code belhow is inside a method that recovers data from a database and put into a dataset
, and generates the chart as an JPEG image.
The chart is generated, but I can't find a way to customize the chart the way I need.
My code is as shown:
// * 'graphicValues' data set is already created *
JFreeChart graphicObject = ChartFactory.createLineChart("Classes",
"months", //linha X
"", //linha Y
graphicValues,
PlotOrientation.VERTICAL,
true,
true,
false);
//Only command that seems to work
graphicObject.setBackgroundPaint(Color.WHITE);
// * from here on, code works fine, I just save it as a file somewhere *
Can anyone help me to set the line to blue and show values as label over square markers?
Thank you very much!