javascript - fetch data in chart.js -


    <!doctype html> <html lang="en"> <head>     <meta charset="utf-8" />      <!-- import plugin script -->     <script src='https://cdnjs.cloudflare.com/ajax/libs/chart.js/1.0.2/chart.min.js'></script> </head> <body> <!-- line chart canvas element --> <canvas id="statusticket" width="600" height="400"></canvas>  <script>     // line chart data     var datastatus = {         labels : ["open","assignment","on progress","resolved","closed"],         datasets : [             {                 fillcolor : "rgba(172,194,132,0.4)",                 strokecolor : "#acc26d",                 pointcolor : "#fff",                 pointstrokecolor : "#9db86d",                 data : [203,156,99,251,305,247]             }         ]     }     // line chart canvas     var statusticket = document.getelementbyid('statusticket').getcontext('2d');     // draw line chart     new chart(statusticket).line(datastatus); </script>     </body>     </html> 

i'm new chart.js , want ask simple question.

is there other way fetch data? example: want count how many submitted ticket in jquery function.

data : [203,156,99,251,305,247]

data property format read chart.js data property format, , want know if there way fetch data in kind of format.

any appreciated.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -