-1
我想创建一个高图。我有3个数组。第一个数组包含日期,第二个数组包含浮点值,最后一个数组包含整数值。 我设置工具提示设置十进制值不起作用。另外我想将pB系列添加到高图。我能怎么做?Highchart格式器问题
第一阵列
dates=["201401", "201401", "201401", "201402", "201402", "201402"];
二阵列
krc=["2.22", "3.67", "3.03", "2.22", "3.03", "3.67"];
末阵列
pB=["2", "4", "3", "2", "3", "4"];
$('#dvzKr').highcharts({
chart: {
type: 'spline'
},
title: {
text:dates[0]+"/"+ dates[max_y] +" Dates",
x: -20 //center
},
subtitle: {
text: '',
x: -20
},
xAxis: {
categories: dates
},
yAxis: {
min:1,
title: {
text: 'Krc Values'
},
plotLines: [{
value: 0,
width: 1,
color: '#000000'
}]
},
tooltip: {
valueDecimals: 2
},
series: [{
name: 'Krc Values',
color: '#F7A35C',
data: krc
}]
});
你能提供的jsfiddle? –
为什么你的数据有字符串而不是数字? – Strikers