Bar Chart |
I look for the alternative solution from Flotr , goggle chart, and Highchart. After some search, i conclude to use highchart.
Some criteria i made in the search are :
- Running in javascript
- Work in any web browser
- Can use ajax to load data
- Have multiple chart options
- Good documentation
- Full feature and basic needs for display report chart with data
var myAjaxChart; $(document).ready(function () { monthlyChart = new Highcharts.Chart({ chart: { renderTo: 'monthlyChart', type: 'column' }, title: { text: 'Profit per month' }, xAxis: { categories: ['Jan','Feb','Mar'] }, yAxis: { title: { text: 'USD' } } }); setIntervalAndExecute(function(){ $.getJSON('/Ajax/profit-per-month', function(data) { monthlyChart.clearSeries(); $.each(data, function (key, value) { monthlyChart.addSeries({ name: value.Name, data: value.Values }); ; }); }); }, 5000); });
You will have the code to have data from the ajax url /Ajax/profit-per-month
For the json generation, will be on other blog page discussion i guess.
Hope this help you with highchart coding.