【发布时间】:2023-03-30 22:05:02
【问题描述】:
我有一个代码,可以根据保存的参数创建一个高图表。我通过首先创建一个对象来创建它——这不是 highcharts 建议的方式,但对于我的目的来说是必要的。
我似乎找不到将 colorAxis 及其属性传递给要创建的图表的正确方法。这是我尝试过的:
-
colorAxis 作为一个对象,在主图表上只是一个对象。
thischart.colorAxis={}; thischart.colorAxis.stops=...包含信息的数组数组... thischart.colorAxis.min=window[PlotID].colorAxis.min; thischart.colorAxis.max=window[PlotID].colorAxis.max;
...其他参数...
...new Highcharts.Chart(thischart);
-
colorAxis 作为主图表上的一个对象,带有一个数组。
thischart.colorAxis=new Array();
thischart.colorAxis['0']={};
thischart.colorAxis['0'].stops=...包含信息的数组数组... thischart.colorAxis['0'].min=window[PlotID].colorAxis.min; thischart.colorAxis['0'].max=window[PlotID].colorAxis.max;...其他参数...
...new Highcharts.Chart(thischart);
老实说,我已经使用这个软件好几个月了,缺乏文档实在令人沮丧,尤其是在更改已经存在的图表方面。我错过了什么吗?除了主要文件之外,还有其他文件可以解释如何做这样的事情吗?
谢谢
【问题讨论】:
标签: highcharts