X轴重启 - KendoUI
X-axis restarts - KendoUI
使用下面的示例,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
}
}],
});
}
解决方法如下:
与其使用类型 line
,我应该根据以下示例使用 scatterLine
http://docs.telerik.com/kendo-ui/dataviz/chart/overview#multiple-xy-axes
seriesDefaults: {
type: "scatterLine"
},
使用下面的示例,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
}
}],
});
}
解决方法如下:
与其使用类型 line
,我应该根据以下示例使用 scatterLine
http://docs.telerik.com/kendo-ui/dataviz/chart/overview#multiple-xy-axes
seriesDefaults: {
type: "scatterLine"
},