Forgive me if this comes off as a bit hair brain..
I am using the docs as an example to create a simple vertical bar chart. when following the code by making a double[][] which then gets passed into the DefaultCategoryDataset constructor, everything works fine.
But when I change the type to int, it does not accept it. The constructor docs define the argument as Number[][]. Doesn't both int's and doubles derive from this super class?
I really just want to create bar charts in a fashion like the DefaultPieChartDataset by just passing in a total value and a name for the category.
Thanks for the help,
Jim
DefaultCategoryDataset
Re: DefaultCategoryDataset
Hi Jim,
There are two constructors, one takes an array of double primitives (not Double objects), and the other takes an array of Number objects. You could pass an array of Integer objects to the latter constructor, but not an array of int primitives (you'd have to write another constructor to support that).
Regards,
Dave Gilbert
There are two constructors, one takes an array of double primitives (not Double objects), and the other takes an array of Number objects. You could pass an array of Integer objects to the latter constructor, but not an array of int primitives (you'd have to write another constructor to support that).
Regards,
Dave Gilbert