Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8159407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:54:05+00:00 2026-06-06T17:54:05+00:00

I was fighting with HighCharts quite some hours for formatting the data input to

  • 0

I was fighting with HighCharts quite some hours for formatting the data input to the series option.
Finally I saw the link here solved my problem for data formatting and input.

The data format that would be recognized by HighCharts pie chart is like this (format 1) as indicated by the link above:

[["chrome",15],["firefox",20]]

I actually want dynamic data input from external URL and format the data so that HighCharts can recognized it. The data format I got from the URL is like this (format 2):

[
    {
        "status": "Stopped \/ Idle",
        "val": 17.469444444444,
    }, {
        "status": "Working",
        "val": 0,
    }, {
        "status": "Headland Turning",
        "val": 0,
    }, {
        "status": "Transport",
        "val": 0.15333333333333,
    }
]

which is already in JSON format.

I just want to know that is that necessary for me to write a parser for the data from format 2 to format 1? Or Am I missing something that HighCharts can recognize the JSON format data and I don’t actually need to write a parser?

I am new to HighCharts so feel free to point that out if some of my problem description does not make sense..Thank you!

EDIT: Thanks for all guys answering my question!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:54:08+00:00Added an answer on June 6, 2026 at 5:54 pm

    When a script expects data in specific format, you often have to map your data to fit format. This can be modified in server code or using javascript

    Can use jQuery $.map to reconfigure an object or array to another array.

    DEMO: http://jsfiddle.net/qpsSe/1

    Note that trailing commas in sample JSON need removing to validate JSON

    /* "json" is your response object, modify variable names to match */
    var chartData=$.map( json, function( obj,i){
            return [[ obj.status, obj.val]];                            
    })
    

    $.map API Docs

    Alternate method in native javascript

    var chartData=[];
    for( i=0; i<json.length; i++){
       chartData.push( [ json[i]['status'], json[i]['val'] ])
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been fighting with jQuery all night and getting quite frustrated here, so forgive
I have been fighting with this for quite some time and have found a
I'm fighting here with System.Printing namespace of .net framework. And what i always saw
I'm fighting with this one for quite some time now. I have my TreeitemRenderer
After fighting with different things here and there, I was finally able to get
I'm fighting with writing a little gallery. There a some thumbs shown next to
I am fighting now like hours to figure out how to make possible to
After fighting several versions of the CoreKeyGen created by some minamoto guy, a new
I've been fighting this for a while, seems I'm close but not quite there.
I've been fighting with this for some time now, and haven't been able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.