在图表 DevExtreme 中自定义标题
Customize Title in Charts DevExtreme
如何自定义 valueAxis 的标题,如下所示:
argumentAxis: {
label: {
customizeText: function () {
return this.value + '';
}
},
这个例子发生在标签上。我可以对 valueAxis 的标题和图表的标题使用相同的函数吗?
干杯
DevExtreme Charts 没有任何图表标题或轴标题的回调函数。
轴有很多标签,因此它们可以取决于轴的某些值或参数,回调函数在这种情况下非常有用。但是 title 是一个单一的静态元素,所以在设置 object:
中将它设置为字符串是最简单的
//...
title: {
text: "Title of chart"
},
argumentAxis: {
title: {
text: "Title of argument axis"
}
},
valueAxis: {
title: {
text: "Title of value axis"
}
}
//...
希望对你有用。谢谢!
如何自定义 valueAxis 的标题,如下所示:
argumentAxis: {
label: {
customizeText: function () {
return this.value + '';
}
},
这个例子发生在标签上。我可以对 valueAxis 的标题和图表的标题使用相同的函数吗?
干杯
DevExtreme Charts 没有任何图表标题或轴标题的回调函数。
轴有很多标签,因此它们可以取决于轴的某些值或参数,回调函数在这种情况下非常有用。但是 title 是一个单一的静态元素,所以在设置 object:
中将它设置为字符串是最简单的//...
title: {
text: "Title of chart"
},
argumentAxis: {
title: {
text: "Title of argument axis"
}
},
valueAxis: {
title: {
text: "Title of value axis"
}
}
//...
希望对你有用。谢谢!