1
在我的代码中,我在图表导航过程中加载了很多文件,但是我想包括诸如zoomType和hover以及mousever在一些特定文件中的feathure。例如,我通过读取sample.json文件来更改图表的zoomType ='x'。如何在Highchart中更改zoomType状态?
$(function() {
var chart;
var options = {
chart : {
type : 'polygon',
renderTo : 'container',
zoomType:''
},
title : {
text : ''
},
credits: {
enabled: false
},
$.getJSON('sample.json', function(data) {
options.series=data;
options.chart.zoomType='x'; /*including zoom feature only for sample.json file*/
var chart = new Highcharts.Chart(options);
});
但是这段代码不起作用。我该如何解决这个错误?
祈祷告诉你的是你的错误。或者我们可以通过在心里调试你的代码来推断它! –
你是什么意思改变zoomtype? –
我编辑了我的问题。 – logicstar