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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:58:11+00:00 2026-06-10T21:58:11+00:00

I was able to get going rendering data sets of time plots so I

  • 0

I was able to get going rendering data sets of time plots so I didn’t think graph problems would be that much more challenging, but for some reason I’m having real trouble outputting this properly.

Json data :

[{"data":[
    {"label":"Times Appeared In Backpacks","data":45,"color":"#D9868C"},
    {"label":" All Backpacks","data":10919,"color":"#86b5d9"}]
]}

Created by

$json_data[] = array('label' => "Times Appeared In Backpacks", 'data' => $appeared, 'color'=> "#D9868C");
$json_data[] = array('label' =>" All Backpacks", 'data' => $total, 'color' => "#86b5d9");
$mergedData[] = array('data' => $json_data);
echo json_encode($mergedData);

Which is called by

$.ajax({
  url: "/whats/encode_pie_graph.php",
  method: 'GET',
  dataType: 'json',
  success: onOutboundReceivedPie
});

function onOutboundReceivedPie(data) {
  console.log(data);

  $.plot($(".graph_pie"), data, {
    series: {
      pie: {
        show: true
      }
    },

    legend: {
      show: false
    }
  });
}

At the minute nothing outputs.

Anything glaringly incorrect here?

Thanks.

  • 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-10T21:58:13+00:00Added an answer on June 10, 2026 at 9:58 pm
    $mergedData[] = array('data' => $json_data);
    

    Turns out isn’t necessary.

    echo json_encode($json_data);
    

    The data I have can simply be json_encode()’d to be read via ajax and accepted by flot.

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

Sidebar

Related Questions

I'm only going to be able to get each site that wants my widget,
Trying to get some custom sorting going on and haven't been able to get
After going through few articles about performance, Not able to get this statement exactly.
Can anyone figure out what's going on here? I was able to get my
I have 50+ kiosk style computers that I want to be able to get
not able to get this, can someone help for this LINQ query? select col1,
I am able to get the current date, but I don't know how to
I am not able to get the hg head or status for a given
I am able to get the output of a pdf using fpdf, the problem
I'm not able to get this persistence file correct... I do not find any

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.