score:1
I believe you want something like this:
data: $.map(category_transactions_sum, function(i, c) { return [c.title, c.amount]; })
score:0
Alex almost has it.
Should be:
someVar = [{title: "Salary", amount: 50},{title: "Food", amount: 25},{title: "Recreation", amount: 10}]
data = $.map(someVar, function(i) { return [[i.title, i.amount]]; })
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
series: [{
type: 'pie',
name: 'Expenses',
data: data
}]
});
score:1
you can try this (works for me):
temp = $.map(json, function(i) { return [[i.in_time, i.status]]; })
showData = JSON.parse(JSON.stringify(temp, null, ""));
and then use in the series as :
chart.addSeries({
data: showData
});
Source: stackoverflow.com
Related Articles
- Converted PHP code that built an array to JS and now highcharts doesn't work - what did I do wrong?
- Highcharts series data array
- Use an array of objects for series data in Highcharts
- How do I set highcharts line graph point colors to an array of colors?
- How get data name in Highcharts pie chart legend instead of "Slice" using array of values?
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts - Global configuration with common code and unique data & Headings
- How to populate a Highcharts axis with string formatted data from a PHP array
- Highcharts .update modifying original data array
- Highcharts Y-Axis skipped labels when dealing with large array
- Restructuring array for Highcharts use
- To pass dynamic json array to Highcharts Pie Chart
- HighCharts Stock Chart error code 18
- highcharts change rendered image source on click
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- How to connect js array to highcharts
- Highcharts adding array of variable to series
- Use of DotNet HighCharts dll to make charts in code behind
- Passing data to highcharts from javascript array or variable
- How to edit tooltip in Highcharts C# code
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
- Javascript - Highcharts - input data array of arrays
- Highcharts Graph displaying 0 value continuously : Javascript Array
- passing json values to highcharts from .net code behind
- how to use highcharts tooltip formatter in python code
- Highcharts categories from data array
- passing formatting JavaScript code to HighCharts with JSON
- Formatting data array correctly for Highcharts
- HighCharts and Javascript to pass data as array
- How to show dependencies' data in a tooltip in highchart gantt?
- Background columns in linechart highchart
- Tooltip appears under plotLine highcharts
- Best way to automatically generate highcharts image
- How to change the font properties in a pie highchart?
- Show N/A in datalabels, when value is null - Highcharts
- I'd like to use several Highcharts using different data but same options
- Highmaps from sharepoint data
- adding a custom variable as a tooltip in highcharts scatter chart
- Highcharts error csv.replace is not a function
- Highcharts - Multiple charts with same object
- How to remove Series name on bottom and we are not getting bar value on top of each bar and also each bar description is aligned cross in Columnchart
- Drawing a dynamic Mixed Bar and Line chart with HIghchart.js with socket.io for live data
- How to process csv data (datetime) month, week, day, hour in highstock highcharts
- Insert tag “series:” into Highcharts, from the response server JSON. Malformed JSON?
- How can i change symbol in tooltips on a chart? HIGCHARTS
- Individual shape and position of annotations in highcharts
- Highcharts and Excel Slicers
- Jquery was not found on this server. Wordpress
- Highcharts in InfoWindow on Google Maps