How to customize BarChart ?
How to customize BarChart ?
Hi !
Simple question, as in the topic.
How can I cusotmize my BarChart ?
My JFreeChart object doesn't have any method, for example getPlot() e.t.c.
Please help
Simple question, as in the topic.
How can I cusotmize my BarChart ?
My JFreeChart object doesn't have any method, for example getPlot() e.t.c.
Please help
I think you will have to be a little more specific about what part of the JFreeChart you need to customise, i.e. Colours, Datasets, tick marks, scaling etc.
The simplest way to start using a chart is to use the ChartFactory static methods
You can then get the plot by using
The simplest way to start using a chart is to use the ChartFactory static methods
Code: Select all
JFreeChart jFreeChart = ChartFactory.createBarChart("Chart title", "categoryAxisLabel", "ValueAxisLabel", categoryDataset, PlotOrientation.VERTICAL, true, false, false);
Code: Select all
jFreeChart.getCategoryPlot()
jfreechart-1.0.1
and then there are no methods for chart object.
i hit ctrl+space and no completions available !
Code: Select all
JFreeChart chart = ChartFactory.createBarChart3D(her goes all params);
i hit ctrl+space and no completions available !
I use eclipse 3.1 and 3.2 at the moment - you will need to attach the source code to the jar file for code completion.
This works in eclipse 3.1.0 so YMMV
Right click on the project and select
Build Path -> Configure Build Path...
Select the Libraries tab
Open up the tree on the jfreechart.jar entry (i.e. click the '+')
Click on the Source attachment: (None) entry
Click the Edit... button
Select the source folder for JFreeChart
This works in eclipse 3.1.0 so YMMV
Right click on the project and select
Build Path -> Configure Build Path...
Select the Libraries tab
Open up the tree on the jfreechart.jar entry (i.e. click the '+')
Click on the Source attachment: (None) entry
Click the Edit... button
Select the source folder for JFreeChart