【问题标题】:Google Charts: Adding stroke to points谷歌图表:将笔划添加到点
【发布时间】:2015-10-01 08:34:07
【问题描述】:

我希望在我的 Google 折线图中的点周围添加一个笔划。

从谷歌图表的points-documentation(底部)我们得到:

以下样式自定义可用:[...] - stroke-color(指定为十六进制字符串。) - stroke-width(指定为十六进制字符串。)

我找不到有关如何添加这些选项的文档。有谁知道吗?

【问题讨论】:

    标签: javascript google-visualization


    【解决方案1】:

    借用 google 的一个例子(见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]
        ]);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-02-09
      • 2018-07-26
      • 2014-12-08
      • 2018-02-28
      • 1970-01-01
      • 1970-01-01
      • 2019-06-23
      相关资源
      最近更新 更多