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