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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:37:32+00:00 2026-06-17T14:37:32+00:00

I am trying to update a jqplot chart dynamically with Ajax requests. My server

  • 0

I am trying to update a jqplot chart dynamically with Ajax requests.
My server is returning a string represtation of the data as such:

“[[‘Juice’,30],[‘Milk’,30],[‘Water’,30]]”

However I need to convert this string into an array of arrays.
Is this the correct approach to update the data and if so what is the best way to convert the string.

   $.ajax({
       url:'http://localhost',
       success:function(plotData){
       var data = plotData.split(","); 
         if(plot){
             plot.series[0].data = data;
             plot.redraw();
         }
       },
       fail:function(error){
          alert('error:'+error);         
       }
   });   

This code will convert into a one dimentional array:

0: “[[‘Helpdesk'”
1: “30]”
2: “[‘Users'”
3: “30]”
4: “[‘Auto Generated'”
5: “30]]”

  • 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-17T14:37:33+00:00Added an answer on June 17, 2026 at 2:37 pm

    You can use eval("var x= " + plotData) as an alternate solution. There are few dangers in using eval, please go through it before using it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to update some Core Data. The data is actually updating somewhere, but its
Trying to update a table on a linked server (SQL 2000/2005) but my server
Im trying to update a progress bar while doing some data type checks on
We are trying to update data to the database from an ASP.Net DetailsView with
I am trying to update a datagridview and a chart. I have a class
I am trying to update a listview with the content in an ArrayList<HashMap<String, String>>
I'm trying to update Table1 in DB1 with data from Table2 in DB2. I
Im trying to update at PropertyListView after i have deleted an entry via Ajax,
Im trying to update an sqlite table row(id, data columns) from rails console. All
Im trying to update a table with data from another table, the relation between

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.