How to change a line chart series's color according to the the point's value in Kendo UI? -


for example,i have series have 5 points , values 5,10,15,20,25,now want change color of part series contains point1(value:5) point2(value:10) red,and want change color of part series contains point2(value:10) point2(value:15) green,and on,how that?now can change color of whole series,but not know how change part of series according value?

change whole series

function ondatabound(e) {     e.sender.options.series[0].color= "red";    } 

just example,i can change color of point,but can not change line between start point , end point.my example

the color option of series can set function called during rendering. here short demo:

<div id="chart"></div> <script> $("#chart").kendochart({   series: [{     data: [1, 2],     color: function(point) {       if (point.value > 1) {         return "red";       }        // use default series theme color     }   }] }); 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -