加载后获取Highcharts系列数据 [英] Get Highcharts Series Data after Load
本文介绍了加载后获取Highcharts系列数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
到目前为止,我只是成功地获得了这个系列数据。得到一堆字符串,这显然不是我所期望的。不知道是否有人可以帮助我。
jQuery代码:
success:function(chartData){
if(chart!= undefined){
$('#meterloader')。hide();
$ .each(chart.series [0],function(value){
alert(value);
});
} else {
$('#meterloader')。hide();
$('#meterbox')。html(< div>< p class ='textcentre bold red'>加载图表时发生错误。< / p>< / div> );
$ b $ p
$ b $ p $ b $ $ b 解决方案您需要从图表中绘制数据,
然后尝试
chart.series [0] .data
如果您需要所有选项系列然后尝试
chart.series
这将返回图表的整个系列结构。
我希望这对您有用。
I am trying to get the series data from a Highcharts chart once it has been called and loaded to the page.
So far I've only been successful in getting a bunch of strings that isn't what I am after obviously. Wonder if someone can help me with this one.
jQuery Code:
success: function (chartData) {
if(chart != undefined) {
$('#meterloader').hide();
$.each(chart.series[0], function(value) {
alert(value);
});
} else {
$('#meterloader').hide();
$('#meterbox').html("<div><p class='textcentre bold red'>There was an error loading the chart.</p></div>");
}
}
Thanks in advance.
解决方案 you need plotted data from the chart,
then try
chart.series[0].data
if you need all the options from series then try
chart.series
this will return the entire series structure of the chart.
I hope this is useful for you.
这篇关于加载后获取Highcharts系列数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文