Customize Title in Charts DevExtreme

How can I customize title to the valueAxis like this:

        argumentAxis: {
               label: {
                   customizeText: function () {
                       return this.value + '';
                   }
               },

This example is happening with the lable. Could I use the same function to the title of valueAxis and title of chart?

Cheers


DevExtreme Charts don't have any callback functions for title of a chart or title for axes.

There are many labels for axes so they can depends on some values or arguments of axis and callback function is really helpful in this case. But title is a single static element, so it would be simplest to set it like a string in settings object:

//...
title: {
   text: "Title of chart"
},
argumentAxis: {
   title: {
      text: "Title of argument axis"
   }
},
valueAxis: {
   title: {
      text: "Title of value axis"
   }
}
//...

I hope it will be useful for you. Thanks!

链接地址: http://www.djcxy.com/p/31010.html

上一篇: DevExtreme图表标签重叠

下一篇: 在图表DevExtreme中自定义标题