使用下面的示例,x 轴系列并非从相同的 x 值开始。 x 轴将在中途从 0 重新开始。
function createChart() {
$("#chart").kendoChart({
title: {
text: "Path"
},
categoryAxis: {
labels: {
step: 10,
format: "####"
},
},
valueAxis: {
reverse: true,
},
series: [{
type: "line",
field: "y",
categoryField: "x",
name: "Path1",
style: "smooth",
data: stats,
markers: {
visible: false
}
}, {
type: "line",
field: "y",
categoryField: "x",
name: "Path2",
style: "smooth",
data: stats2,
markers: {
visible: false
}
}],
});
}
最佳答案
解决方案如下:
我应该根据以下示例使用 scatterLine
,而不是使用类型 line
http://docs.telerik.com/kendo-ui/dataviz/chart/overview#multiple-xy-axes
seriesDefaults: {
type: "scatterLine"
},
关于javascript - X轴重新启动 - KendoUI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29686432/