Tooltip Template Formating in Kendo-UI

前端 未结 1 568
一生所求
一生所求 2020-12-21 22:50

I have the following code, and initially my data consists only x and y values, however, once I added another value which is k but it s

相关标签:
1条回答
  • 2020-12-21 23:03

    Finally, here is the solution that I have come up so far. The key-point here is to access data via dataItem not via value-->(value.x, value.y) that restricts to access other elements in data objects other than only x and y.

    It seems that value inherits from dataItem.

     tooltip:
         {
         visible:true,
         template: 
           "x : #=kendo.format('{0:n0}', (Math.abs(dataItem.x)))#, 
            y : #=kendo.format('{0:n0}', (Math.abs(dataItem.y)))#, 
            k : #=kendo.format('{0:n0}', (Math.abs(dataItem.k)))# "
         }
    

    http://jsfiddle.net/3yhbyy2g/50/

    0 讨论(0)
提交回复
热议问题