[英]HighChart doesn't output anything
我正在使用HighChart繪制圖形,但是它沒有打印出任何內容,我已經檢查了傳遞的“數據”數組,似乎沒有任何問題
我的代碼如下所示:
var high = []; //data
$.each(data.getHighValue, function (key, value) {
high.push(value.High);
});
$(function () {
$('#container').highcharts({
chart: {
type: 'line',
marginRight: 130,
marginBottom: 25
},
title: {
text: 'Weekyly Data',
x: -20 //center
},
subtitle: {
text: 'From Arp 1st ro Apr 15th',
x: -20
},
xAxis: {
categories: ['Mon', 'Tues', 'Weds', 'Thurs', 'Fri', 'Sat', 'Sun']
},
yAxis: {
title: {
text: 'Blood Level (unit)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: 'unit'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [{
name: 'High Blood Level',
data: high
}]
});
});
我的“高”數組具有以下值:113、114、115、116、117、115、127
您可能在Highcharts之后加載了jQuery。 需要在Highcharts之前加載它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.