我正在研究掌握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.
See the official DataTable documentation for more info.
更多推荐
发布评论