score:2
Accepted answer
looking at the pyramid example, the data must be in the form of a single series with each data point as an array of [name, value]
. you have two options, change your php to output the correct format or modify the php output in javascript. since you didn't post your php code, i'll do the later:
var data = {"success":1,"data":[{"name":"john spoon","data":300}, {"name":"dave jones","data":200},{"name":"other","data":500}]};
options.series = [{
data: $.map(data.data, function(i){ // loop outputted data
return [[i.name, i.data]]; // coerce into an array of [name,value]
})
}];
here's a working example.
Source: stackoverflow.com
Related Query
- Highcharts Pyramid Chart displays no data with JSON, PHP
- Passing data from PHP array to Highcharts chart with JSON
- Reload chart data via JSON with Highcharts
- Returning JSON file with cURL to use data in a HighCharts stock chart
- Extract data series from a JSON array for a Highcharts chart with 2 y-axis
- Data Conversion from SQL, C# with Linq to JSON for Highcharts Line chart
- Highcharts cloud issue with data source when duplicating chart
- how to make chart real time with 2 line and get data from php with highcharts
- Javascript, using Highcharts to display a chart of rankings with JSON Data
- HighCharts Data with JavaScript PHP JSON
- Highcharts real time chart with incoming Json data [FIXED[]
- Highcharts displays series names but missing data points from json source
- Highcharts data series issue with ajax/json and PHP
- Highcharts with JSON data and multiple series
- Add dynamic data to line chart from mysql database with highcharts
- Highcharts - Global configuration with common code and unique data & Headings
- How to populate a Highcharts axis with string formatted data from a PHP array
- Show more data on Gauge chart with Highcharts
- Formatting JSON Data with ColdFusion for HighCharts
- Highcharts with ajax and json data what am i doing wrong?
- How to format my json data for stack column chart in HighCharts
- Splitted bar chart for paired data with highcharts
- How to Build a Column Chart in Highcharts with Data Entered Dynamically Within a CMS
- dynamic highcharts with json data
- Retrieving JSON data for Highcharts with multiple series?
- JSON data not showing in highstock Candlestick chart using PHP & MYSQL
- Highcharts add point to line chart with json
- Add different symbols to highcharts chart with dynamic data
- passing formatting JavaScript code to HighCharts with JSON
- Highcharts polar chart wind rose data from JSON
More Query from same tag
- HighCharts Y Axis scales aren't correct
- Highcharts Not Displaying AreaRange in Legend
- Create log scale in highstock
- How to enable scrollbar in highchart
- Sort stackbar chart in highchart based on size of each stackbar
- Highcharts : display a second series under the X-Axis
- Making Highcharts scatter circle shadow
- Loading chart via Angular ngRoute not working
- Highstock display two horizontal rules
- Highmaps in VueJs....pass a State to mapOptions
- Unable to create Highchart where i can show different - different data on clicking category and series
- parse file from input with papaparse
- How to slide highcharts?
- Change style for a specific tick in highcharts
- Highmaps heatmap
- Charts rendered using highcharts in angular2 do not take the height of the parent
- Highcharts: How can I create a table of strings that can also export as an image?
- Send JSON data to highcharts pie from asp.net MVC controller in C#
- Vertical align legends in highcharts with two column
- Pie-donut using .csv
- Highcharts error csv.replace is not a function
- SyntaxError: JSON.parse: expected property name or '}' while using highcharts
- Replace axis labels with custom in highcharts r
- Highcharts: phantomjs export image missing labels
- Highcharts zIndex of dataLabel vs renderer.rect vs tooltip
- Highmaps UK map data
- How to format column chart data labels
- Is it possible to get axis lines to cross with highcharts
- How Highcharts ChartView redraw or wait for AsyncTask data in Android
- Change map color on specific provinces