I think my question is a little silly, but I couldn't find the answer in the examples!
I create a area chart and I need to change the name of the series, in the legend of the graph
here:
final CategoryDataset dataset = DatasetUtilities.createCategoryDataset(
"Series ", "Type ", data
);
When a put "Series", it appears in the legend, something like this: Series 1, Series 2, Series 3.....
Is it possible to change their names, and each one has a different name?
The DatasetUtilities
API is here . Looking at createCategoryDataset()
,
public static CategoryDataset createCategoryDataset(
java.lang.Comparable[] rowKeys,
java.lang.Comparable[] columnKeys,
double[][] data)
note in particular,
Row and column keys are taken from the supplied arrays.
It looks like you can just pass in an array of the values that you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.