以下是完整的解決方案和的jsfiddle:http://jsfiddle.net/3yhbyy2g/9/
的關鍵部分解決方案是接近每個軸(x和y)。並在y軸上添加reverse:true
。
function createChart() {
$("#chart").kendoChart({
title: {
text: "Path"
},
tooltip: {
visible: true,
format: "Value: {0:N0}",
},
xAxis: {
max: 8000,
labels: {
format: "{0}m"
},
title: {
text: "Meter"
}
},
yAxis: {
reverse:true,
labels: {
format: "{0}",
padding: {
left: 10
}
},
title: {
text: "Charge"
}
},
seriesDefaults: {
type: "scatterLine",
},
series: [{
name: "Path1",
data: stats,
markers: {
visible: false
}
}, {
name: "Path2",
data: stats2,
markers: {
visible: false
}
}],
});
}
$(document).ready(createChart);