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 8997533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:54:08+00:00 2026-06-15T23:54:08+00:00

I am trying to render jqplot widget with dynamic JSON and I cannot find

  • 0

I am trying to render jqplot widget with dynamic JSON and I cannot find how to do it.

The Only examples I saw included reading JSON from file but I want to use JSON as String for example:

{"oranges":"10","apples":"20","bananas":"6"}

any idea?

  • 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-15T23:54:09+00:00Added an answer on June 15, 2026 at 11:54 pm

    The data in your question is not a string, it’s a javascript object literal.

    If you have oranges, apples and bananas you’ll probably want to draw a bar chart; you’ll need to extract the labels and the values from the object and then plot the chart:

    var chart_data = {"oranges":"10", "apples":"20", "bananas":"6"};
    var line1 = [];
    for (var prop_name in chart_data) {
        line1.push([prop_name, chart_data[prop_name]])
    }
    // line1 should be [["oranges", 10], ["apples", 20], ["bananas", 6]]
    
    
    // code snippet from http://www.jqplot.com/tests/rotated-tick-labels.php
    // please change it as you need
    var plot1 = $.jqplot('chart1', [line1], {
        title: 'Fruits',
        series: [{renderer:$.jqplot.BarRenderer}],
        axesDefaults: {
            tickRenderer: $.jqplot.CanvasAxisTickRenderer 
        },
        axes: {
          xaxis: {
            renderer: $.jqplot.CategoryAxisRenderer
          }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying render the results of surveys from Surveryor gem as a CSV file,
When trying to render a Django template file in Google App Engine from google.appengine.ext.webapp
Im trying to render a django template from a database outside of djangos normal
I'm trying to render a ruby hash to a json string in haml. (the
I am trying to render the magento contact form into a .phtml file, but
I'm trying to render a component from withing another component. public override void Render()
Trying to render a sphere using isgl3d. The problem is that only say 75%
I'm trying to render .odf files from a controller action in a rails application.
I am trying to render content generated by a php file in [jQuery Colorbox][1]
I'm trying to render from a pnr controller to the index of a web_services

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.