【问题标题】:Dynamically update area.stacking from normal to null using highchart-ng使用 highchart-ng 将 area.stacking 从 normal 动态更新为 null
【发布时间】:2017-05-05 20:59:10
【问题描述】:

我是 highstocks 的新手,我正在努力实现一些我找不到任何文档的东西。

我有一个堆积面积图。所以在这个阶段 plotOptions 看起来

plotOptions: { area: { stacking: "normal" } }

单击一个按钮,我想将其更改为

plotOptions : { area: { stacking: null (undefined, tried both) } }

从而使它成为一个基本的面积图。 highstock 中没有 plotOptions 更新功能,如果我尝试手动更新它,它就不起作用。关于如何完成这项工作的任何建议或想法

【问题讨论】:

    标签: angularjs highcharts highstock highcharts-ng stacked-area-chart


    【解决方案1】:

    使用chart.update() 更新plotOptions。

    chart.update({
      plotOptions: {
        series: {
          stacking: null
        }
      }
    })
    

    示例:http://jsfiddle.net/v3zcse3w/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-24
      • 2018-04-11
      • 1970-01-01
      • 1970-01-01
      • 2016-01-12
      • 2015-01-11
      • 2020-12-18
      相关资源
      最近更新 更多