0
   

Json Object for HighCharts

 
 
Reply Wed 28 Nov, 2012 12:39 pm
var channel_data = [
{
"27th Oct 12": {
"xaxis": "27th Oct 12",
"channels": {
"Create and Craft": {
"views": 13064,
"bandwidth": 623136899214,
"name": "Create and Craft"
},

"5 USA": {
"views": 394,
"bandwidth": 17889861768,
"name": "5 USA"
}
},
"totalViews": 25470,
"totalBandwidth": 923866774348
},
"28th Oct 12": {
"xaxis": "28th Oct 12",
"channels": {
"Create and Craft": {
"views": 15298,
"bandwidth": 860108829822,
"name": "Create and Craft"
},

"5 USA": {
"views": 500,
"bandwidth": 28770314737,
"name": "5 USA"
}
},
"totalViews": 29377,
"totalBandwidth": 1248778079465
}}]
I need to loop through this data and build the following array of objects to use with Highcharts rendering. Categories will be the dates and the data are the views for each date for each channel.

categories: ['27th Oct 12", "28th Oct 12"]

series: [{
name: 'Create and Craft',
data: [13064, 15298]
}, {
name: '5 USA',
data: [394, 500]
}, {

}]
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,312 • Replies: 0
No top replies

 
 

Related Topics

Building Quiz using jquery and html5 - Question by mmdsaad
 
  1. Forums
  2. » Json Object for HighCharts
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/26/2024 at 07:23:19