代碼中的錯誤在哪裏:/我很傻我找不到它。在JavaScript函數中遇到問題
// Draw chart
$(function(){
$.getJSON('data.php?name=<?php echo $name; ?>&mysqltablename=<?php echo $mysqltablename; ?>&datatabletyp=<?php echo $datatabletyp ?>',
function(data) {
chart = new Highcharts.Chart
({
chart: { renderTo: '<?php echo $tabname; ?>', zoomType: 'x', type: 'line', width:800 },
credits: { enabled: false },
plotOptions: { series: { marker : { enabled: false, states: { hover: { enabled: true } } } } },
xAxis: { type: 'datetime' },
title: { text:' ' },
yAxis: { title: { text: '' } },
legend: { enabled: false },
series: [{ name: 'john', data: data[] }],
});
Highcharts.setOptions({ global: { useUTC: false } });
Highcharts.numberFormat(this.y, 2, '.', ',');
});
});
控制檯拋出這個錯誤
還刪除尾隨逗號。不允許在IE – mplungjan
在屏幕截圖中看起來像'token}',儘管它應該是'token]'。無論如何,這條線上只有兩個''''''''''''''''''] –