gpt4 book ai didi

javascript - 谷歌图表 : Adding stroke to points

转载 作者:行者123 更新时间:2023-11-30 16:34:33 25 4
gpt4 key购买 nike

我想在我的 Google 折线图中的点周围添加一笔画。

来自points-documentation Google Charts(底部)我们有:

The following style customizations are available: [...] - stroke-color (Specified as a hex string.) - stroke-width (Specified as a hex string.)

我找不到有关如何添加这些选项的文档。任何人,谁能弄清楚?

最佳答案

借用谷歌的一个例子(参见 https://jsfiddle.net/j9sgdr4d/)

var data = google.visualization.arrayToDataTable
([['X', 'Y', {'type': 'string', 'role': 'style'}],
[1, 3, null],
[2, 2.5, null],
[3, 3, null],
[4, 4, null],
[5, 4, 'point { size: 18; shape-type: star; fill-color: #a52714'],
[6, 3, 'point { size: 18; shape-type: star; fill-color: #a52714; stroke-color: #ff0000; stroke-width: 5'],
[7, 2.5, null],
[8, 3, null]
]);

enter image description here

关于javascript - 谷歌图表 : Adding stroke to points,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32882959/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com