Is there a way to add a null (data) series to an instance of DefaultCategoryDataset?
For instance, I have 2 series, only one has data, the other is null for all categories. I would like the legend to still show there are 2 series associated with the chart.
Thanks,
Stacey
adding null data to DefaultCategoryDataset.
Re: adding null data to DefaultCategoryDataset.
Hi Stacey,
If your dataset returns null for all categories in a particular series, that series should still show up in the legend.
The current implementation of DefaultCategoryDataset isn't very flexible...in the upcoming 0.9.5 release, this class has been rewritten to allow better manipulation of the data content.
Regards,
Dave Gilbert
If your dataset returns null for all categories in a particular series, that series should still show up in the legend.
The current implementation of DefaultCategoryDataset isn't very flexible...in the upcoming 0.9.5 release, this class has been rewritten to allow better manipulation of the data content.
Regards,
Dave Gilbert
Re: adding null data to DefaultCategoryDataset.
Thanks for your reply David,
I am working with the CVS repository latest (as of 1/28).
I probably didn't specify my question the best, but the series I would like to be viewable actually doesn't have any categories either (at least none defined for a particular set). Therefor, the only information I have for that serie is that there is one. There are no categories or values to specify for it. I believe what I need is a way to add a series to the dataset but only using the serie "Name". The only way I have determined to add a serie is using the method(s)
addValue(Value, serie, category); // or setValue(...)
Using this implementation, a value and category must exist to add new serie information.
I very well could be missing something though.
Thanks again for your time.
Stacey
I am working with the CVS repository latest (as of 1/28).
I probably didn't specify my question the best, but the series I would like to be viewable actually doesn't have any categories either (at least none defined for a particular set). Therefor, the only information I have for that serie is that there is one. There are no categories or values to specify for it. I believe what I need is a way to add a series to the dataset but only using the serie "Name". The only way I have determined to add a serie is using the method(s)
addValue(Value, serie, category); // or setValue(...)
Using this implementation, a value and category must exist to add new serie information.
I very well could be missing something though.
Thanks again for your time.
Stacey
Re: adding null data to DefaultCategoryDataset.
Hi Stacey,
I haven't had a chance to try it yet, but what happens if you do:
addValue(null, "MySeries", "MyCategory");
I would expect that to add a new series that appears in the legend but not on the chart...
Regards,
Dave Gilbert
I haven't had a chance to try it yet, but what happens if you do:
addValue(null, "MySeries", "MyCategory");
I would expect that to add a new series that appears in the legend but not on the chart...
Regards,
Dave Gilbert