0
我有一個'spline'HighChart工作,但想向工具提示添加更多的數據,所以希望使用帶有x
和y
語法的JSON對象,以便能夠進一步填充此對象Highcharts Series data as JSON does not render
本來我是用一系列的格式爲:
{
name: 'Series 1',
data: [[x,y],[x,y],[x,y]]
}
這工作得很好,但它更改爲:
{
name: 'Series 1',
data: [{x: xVal, y: yVal},{x: xVal, y: yVal},{x: xVal, y: yVal}]
}
哈我停止了我的圖表工作。在這裏使用小提琴:https://jsfiddle.net/xbL65gqn/此句法看起來是有效的。什麼可能導致它無法工作?
僅供參考繼承人我highcharts配置:
{
chart: {
type: 'spline',
backgroundColor: 'transparent',
style: {
color: FONT_COLOR
}
},
credits: { enabled: false },
plotOptions: {
series: {
marker: { enabled: false }
}
},
legend: { enabled: false },
series: series,
title: {
text: '',
labels: {
style: {
color: FONT_COLOR
}
}
},
tooltip: {
crosshairs: {
dashStyle: 'solid'
}
},
xAxis: {
type: 'datetime',
labels: {
style: {
color: FONT_COLOR
}
}
},
yAxis: {
title: {
text: 'Uplift',
textAlign: 'right',
rotation: 0,
style: {
color: FONT_COLOR
},
y: -174,
x: 34
},
max: maxLabel,
min: -maxLabel,
showLastLabel: false,
labels: {
formatter: function() {
return this.value + '%'
},
style: {
color: FONT_COLOR
}
}
}
您加載到圖表上多少點?如果超過1000,則可能是由turboThreshold https://jsfiddle.net/xbL65gqn/1/引起的。如果是由turboThreshold引起的,請將其設置爲0(0或大於點數的值) – morganfree