Tuesday, 15 July 2014

jquery - How to change the Highchart color dynamically -



jquery - How to change the Highchart color dynamically -

i have problem highchart series populated dynamically looping model. if need alter color of highchart base of operations on value of series. here code

series: [{ name: 'flag', showinlegend: false, pointwidth:24, pointpadding:0, grouppadding:0, data: (function() { var info = []; @{ var itemsumarylistdata = model; int subordinatecount = itemsumarylistdata.subordinatecount; if(itemsumarylistdata.employeeteamlevelsummarylist.count > 0){ foreach (var employee in itemsumarylistdata.employeeteamlevelsummarylist) { <text>data.push(@employee.totalflag );</text> } } } homecoming data; })() }]

you can set color parameter:

http://jsfiddle.net/x8jvj/

series: [{ name: 'tokyo', color:'yellow', data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] }]

jquery highcharts

No comments:

Post a Comment