了解Google Visualization中的系列属性(Understanding series property in Google Visualisation)

编程入门 行业动态 更新时间:2024-10-13 18:27:32
了解Google Visualization中的系列属性(Understanding series property in Google Visualisation)

我正在研究掌握Google Visualisations系列属性的含义。 因此,例如下面关于我在文本之后放置的虚拟数据的系列语句的含义是什么。

series: {2: {type: "line"}}

使用下面的数据,上面的平均值使用最后一列中的数据绘制线图。

虚拟数据表:

data.addRow(["Set 1", 900, 450, 50]); data.addRow(["Set 2", 700, 550, 40]); data.addRow(["Set 3", 500, 350, 30]); data.addRow(["Set 4", 300, 100, 20]); data.addRow(["Set 5", 150, 50, 10]);

要么

使用上面的数据表确实是系列:{1:{type:“line”}}意味着使用第二列数据绘制折线图?

I'm looking at grasping the meaning of Google Visualisations series property. So for example whats the meaning of the series statement below with regards to the dummy data I placed after the text.

series: {2: {type: "line"}}

Using the data below does the above mean plot a line graph using data in the final column.

Dummy Datatable:

data.addRow(["Set 1", 900, 450, 50]); data.addRow(["Set 2", 700, 550, 40]); data.addRow(["Set 3", 500, 350, 30]); data.addRow(["Set 4", 300, 100, 20]); data.addRow(["Set 5", 150, 50, 10]);

OR

Using the above datatable does series: {1: {type: "line"}} mean plot a line graph using column two data?

最满意答案

这是一个更新的例子 。 这与您的其他问题相同,但使用此处提供的数据。

在这种情况下,我使用了series: {1: {type: "line"}}所以每行数据的第一个值('Set *')将是x轴。 每行数据的第二个值(900,700,...)将是索引为0的系列,并将绘制为条形。 每行数据的第三个值(450,550,...)将是索引为1的系列,并将绘制为一条线。 每行数据的第四个值(50,50,...)将是索引为2的系列,并将绘制为条形。

产量

有关详细信息,请参阅官方DataTable文档 。

Here is an updated example. This is the same as your other question but using the data provided in this one.

In this case I used series: {1: {type: "line"}} so the first value of each row of data ('Set *') will be the x-axis. The second value of each row of data (900,700,...) will be the series with index 0 and will be drawn as a bar. The third value of each row of data (450,550,...) will be the series with index 1 and will be drawn as a line. The forth value of each row of data (50,50,...) will be the series with index 2 and will be drawn as a bar.

Output

See the official DataTable documentation for more info.

更多推荐

本文发布于:2023-04-29 03:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1334477.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   系列   Visualization   Google   Visualisation

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!