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
I believe you want something like this:
data: $.map(category_transactions_sum, function(i, c) { return [c.title, c.amount]; })
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 Query
- Use an array of objects for series data in Highcharts
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Restructuring array for Highcharts use
- Formatting data array correctly for Highcharts
- convert string into array for highcharts js
- Highcharts display label for pie chart using html table as data source
- Simple, Open source PHP wrapper for Highcharts library
- Pass array from js for loop to highcharts series data
- Extract data series from a JSON array for a Highcharts chart with 2 y-axis
- Multidimensional JSON to javascript array for highcharts
- Rails 3: Creating compact array for highcharts includes nil, but shouldn't
- HTML table as data source for highstock charts using highcharts
- Including source for Alchemy js breaks Highcharts js
- Single column HighCharts for an array
- Converted PHP code that built an array to JS and now highcharts doesn't work - what did I do wrong?
- Needing to convert JSON Object to JSON Array for Highcharts
- Using a flask variable as data source for highcharts
- Highcharts Interactivity between plots - looking for code improvements
- Error: Data source must be a URL for refresh | console error | javascript | Highcharts
- Highcharts change or add color for name in a array of point.names and y
- Convert DataTable to array for highcharts
- A different suffix from an array for each line on Highcharts
- Use Node.js as data source for highcharts
- Cannot find proper JSON array syntax for Highcharts
- Why does highcharts not accept an array for second y axis?
- Array for subseries on highcharts Drilldown
- How to represent date array in java script for highcharts
- Change json array format for highcharts
- How to build a JSON data array for Highcharts display - switching values for xAxis/columns
- Using an array for data in highcharts
More Query from same tag
- Highcharts data set array
- Datapoints in Xrange highchart are not uniformly getting aligned to the center
- Highcharts/Highstocks jQuery - Scroll, Zoom and Margin issue
- Highchart graph display on iPad going out of container
- How to use html/unicode symbols as marker-symbols in highcharts?
- Drilldown in two steps, multiple choice in Highcharts
- HIghCharts dual axes combo
- In highcharts,tool-tip does not move when chart has high data unlike when it has low data
- Highcharts : How to flag the local maxima on a dynamic graph drawn using HighChart
- Spline chart gradient fill
- highcharts scatter 1 second update with user defined lables on x-axis for each point
- How to position labels for plotbands on y axis in Highcharts
- How to display hovered point value in Highcharts Crosshair
- Saiku query fetch
- How to popup a file dialog/print dialog in a html file that is rendered in a WebEngineView?
- In Highcharts, how to make box plot outliers transition from light to dark colors?
- How to make highcharts display date in hh:mm:ss format, not as timestamp?
- Creating highchart linechart with data using PHP (and Laravel)
- Can we change highcharts legend to work as radio button instead of checkbox style?
- Highcharts not updating data on ajax response data
- Dynamically display percent on y-axis using highchart
- Can highcharts drilldown of a chart, reflect on another chart?
- Highcharts - Can we have default and custom tooltip based on different chart types?
- Highcharts update chart scroll issue- scroll to initial position
- R Highcharter - Countries displayed incorrectly on hcmap
- Highcharts variable threshold
- Highcharts Not displaying function's data values
- HighCharts - Thin white lines in stacked column chart
- Creating HighChart pie charts as sparkline-type elements
- Why does Highcharts div/chart extend past parent div?