在 X 轴上添加自定义点- Kendo UI
Adding Custom Point on the X axis- Kendo UI
我有以下项目,唯一缺少的部分是我无法弄清楚在 X 轴上添加 0。间隔为2000,因此在X轴中间跳过0,即起点。
xAxis: {
min: -5000
, axisCrossingValue: [-5000, 0],
labels: {
template: kendo.template($("#labelTemplate").html())
},
}
, yAxis: {
reverse: true
, labels: {
format: "{0}"
}
}
将 majorUnit:1000 添加到 xAxis
xAxis: {
majorUnit:1000, //<-add here
min: -5000
, axisCrossingValue: [-5000, 0],
labels: {
template: kendo.template($("#labelTemplate").html())
},
}
, yAxis: {
reverse: true
, labels: {
format: "{0}"
}
}
我有以下项目,唯一缺少的部分是我无法弄清楚在 X 轴上添加 0。间隔为2000,因此在X轴中间跳过0,即起点。
xAxis: {
min: -5000
, axisCrossingValue: [-5000, 0],
labels: {
template: kendo.template($("#labelTemplate").html())
},
}
, yAxis: {
reverse: true
, labels: {
format: "{0}"
}
}
将 majorUnit:1000 添加到 xAxis
xAxis: {
majorUnit:1000, //<-add here
min: -5000
, axisCrossingValue: [-5000, 0],
labels: {
template: kendo.template($("#labelTemplate").html())
},
}
, yAxis: {
reverse: true
, labels: {
format: "{0}"
}
}