简体   繁体   English

面积图系列

[英]Area chart Series

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..... 当放置“系列”时,它会出现在图例中,如下所示:系列1,系列2,系列3 .....

Is it possible to change their names, and each one has a different name? 是否可以更改其名称,并且每个人都有不同的名称?

The DatasetUtilities API is here . DatasetUtilities API在此处 Looking at createCategoryDataset() , 查看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. 看起来您可以只传递所需值的数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM