score:2
make an array of avg instead of having avg1, avg2 etc....
$graph_data = array('categories'=>$categories, 'avgs'=>$array_of_avgs)
then in javascript side
success: function(data){
options.xAxis.categories = data.categories;
for(var i in data.avgs){
options.series[i].name = 'Avg'+i;
options.series[i].data = data.avgs[i];
}
var chart = new Highcharts.Chart(options);
And everything will be fine
Source: stackoverflow.com
Related Query
- Dynamic column based highcharts feeding data with jquery and php
- Highcharts data series issue with ajax/json and PHP
- How to structure Angular with Highcharts and lots of dynamic data
- Highcharts v3.0.1 problems with rotating data labels in IE8 and jQuery v1.7.1
- Highcharts - Global configuration with common code and unique data & Headings
- Using yii with dynamic data and highcharts
- Highcharts Dynamic Column color based on data comparison
- Static Highcharts graphic with external csv data and dynamic footnote
- Static Highcharts graphic with csv data and dynamic footnote
- how to make chart real time with 2 line and get data from php with highcharts
- Loading multiple variables using Highcharts and jquery with php
- Highcharts / jQuery - destroy and rebuild chart with original options
- highcharts jquery dynamic change chart type column to bar
- Add a gap between the second and third series in a Highcharts column plot with four series displayed
- Highcharts with JSON data and multiple series
- Add dynamic data to line chart from mysql database with highcharts
- Change Datalabel Color, Rotation and Align values based on Column value in highcharts
- Creating a line graph with highcharts and data in an external csv
- How to populate a Highcharts axis with string formatted data from a PHP array
- AngularJS for Highcharts with dynamic ajax data
- Data with timestamp group to month(like Jan, Feb, March) and showing as total count for month in Highcharts
- Highcharts with ajax and json data what am i doing wrong?
- HighCharts : dynamic data with drill down
- Highcharts Column-chart with php and Ajax
- Animation behave differently between initial load and dynamic data series replacement in Highcharts
- Highcharts show the same yAxis start and end value with multiple data series
- How to Build a Column Chart in Highcharts with Data Entered Dynamically Within a CMS
- dynamic highcharts with json data
- HighCharts & MVC: How to load whole graph definition and data with JSON?
- pushing dynamic data to stacked percentage column in highcharts
More Query from same tag
- Highchart / Highstock how to set color of individual ohlc or candle?
- Shrink browser content to browser window size
- Highcharts donut hover all area
- highchart/highstock tooltip does not adjust after zoom
- Always display value in highcharts column chart
- How to clear blank below heatmap
- How to change the X and Y axis names of Pie chart High Chart?
- Highcharts Legend event click to get data
- How to change the axis of Dual axes Graph
- Set left and right border-like on highchart
- Highstock - SMA (Simple moving average) dataGrouping not working
- highcharts tooltip format millions billions
- HIghCharts dual axes combo
- How to add a second xAxis to Highcharts Stockchart
- HighMaps - need to make datalabels clickable
- how to change highstock date to persian date
- Allow mouse event behind a plotband
- Highcharts: yAxis showing exponential values
- Trying to load flags with my temperature data from json files
- dynamic highchart config in angular ui grid with angular js using pablojim's highcharts ng
- Keep Scroll on the Right Highchart
- Integrate Ember-widgets Highchart in Jinja2 template
- Highcharts windrose with one series without gap
- Disable markers if data > 1 in highcharts
- Highcharts line chart doesn't render when sql returns more than 121 rows
- Click on Highcharts pie rendering border although legend item click is disabled
- Animate Highcharts series when chart appears in view when using Data Module
- Highcharts timeline series positioning
- HighCharts: Treemap dataLabels inconsistent on drilldown/drillup
- Hide axis and gridlines Highcharts