<script language= "javascript" type= "Text/javascript" src= "Js/jquery.min.js" ></script><script language= "javascript" type= "Text/javascript" src= "Js/highcharts.js" ></script><script language= "javascript" type= "Text/javascript" src= "Js/exporting.js" ></script> <script type= "Text/javascript" > var chart; $ (document). Ready (function () { var options = { chart: { renderto: ' Container ', type: ' Line ', marginRight:130, marginBottom:25 }, title: { text: ' Distribution of the day ', x: -20//center }, Xaxis: { categories: [' 0 ', ' 1 ', ' 2 ', ' 3 ', ' 4 ' , ' 5 ', ' 6 ', ' 7 ', ' 8 ', ' 9 '] }, yaxis: { title: { text: ' Y-axis ' }, plotlines: [{ value:0, width:1, color: ' # 808080 ' &NBSP;&NBsp; }] }, tooltip: { formatter:function () { return ' <b> ' + this.series.name + ' </b><br/ > ' + this.x + ': ' + this.y; } }, Legend: { layout: ' vertical ', align: ' Right ', verticalalign: ' Top ', &nbSp; x: -10, y:100, borderWidth:0 }, series: [] }options.series = new Array ();var i;For (i=0;i<10;i++) {Options.series[i] = new Object ();options.series[i].name = ' Sample ' +i;options.series[i].data = new Array (0+i, 1+i, 2+i, 3+i,4+i,5+i,6+i,7+i,8+i,9+i); }Chart = new Highcharts.chart (options); }); </script>
Highcahrts Dynamically binding Data