Hello:
I'm new to JFreeChart.I'm trying to create a sample HorizontalBarChart.If I use the version 0.9.2 with the code that I will put later I get the following exception:
java.lang.ExceptionInInitializerError
The code is this:
Number[][] data = new Integer[][]
{ { new Integer(10),new Integer(5),
new Integer(6),
new Integer(3)}};
DefaultCategoryDataset tbsData = new DefaultCategoryDataset(data);
String[] categories = new String[] { "Caida de personas","Atropellos","Sobreesfuerzo","Golpes"};
tbsData.setCategories(categories);
JFreeChart chart = ChartFactory.createHorizontalBarChart("PDF Test Chart 1","X","Y",tbsData, false);
When I replace the 0.9.2 version of the JFreeChart whith 0.8.1 it works ,and I don't know why. I want to put the values of the categories inside the plot at the right side of the bar and I don't know if I can do it whith 0.8.1 version.
why can this be happening??
Thanks
ExceptionInInitializerError
Re: ExceptionInInitializerError
Your code works fine for me against the CVS version of JFreeChart (which has only been slightly updated since 0.9.2 was released). I'm using Linux/JDK1.3.
Regards,
DG.
Regards,
DG.
Re: ExceptionInInitializerError
You're rigth,it was because of the jdk version.
Now with de 0.9.2 .How can I put the values of the categories inside the plot at the right side of the bar?
(In my code the 10,5,6,3)
I've tried with drawCategoryItem(...) of the HorizontalBarRenderer but I can't make it work .
Thank you.
Now with de 0.9.2 .How can I put the values of the categories inside the plot at the right side of the bar?
(In my code the 10,5,6,3)
I've tried with drawCategoryItem(...) of the HorizontalBarRenderer but I can't make it work .
Thank you.