Highcharts:两个不同系列图表的setOptions? [英] Highcharts: setOptions for two different series of charts?

查看:326
本文介绍了Highcharts:两个不同系列图表的setOptions?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总共有八张小发烧图表。四个用于补助金和四个贷款图表。

I have a total of eight small fever charts. Four for grants and four charts for loans.

使用:

Highcharts.setOptions({
    chart: {
        backgroundColor: null
    }, 
    etc...
});

然后使用以下方式访问这些设置:

and then access those settings using:

var chart1 = new Highcharts.Chart({
    chart: {renderTo: 'smallChart1'},
    series: [{data: [13334, 14376, 15825, 16267]}]
});

我能够让前四个图表都遵循单一选项。

I am able to make the first four charts all follow the single set of options.

这样可行。但现在我想为第二组图表设置setOptions,但我不知道如何制作第二组setOptions,其他四个图表可以共享。

So that works fine. But now I want to setOptions for the second group of charts but I don't know how to make a second set of setOptions the other four charts can share.

谢谢。

推荐答案

SetOptions 只能在 highcharts 。

请参阅 jsfiddle 。这对你的问题很重要。它显示了如何为多个图表使用 SetOptions

See jsfiddle. It is releveant to your question. It shows how to use SetOptions for multiple charts.

这篇关于Highcharts:两个不同系列图表的setOptions?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆