Jump to content
JChartFX Community
  • 0

Loading datasource using json


Hello, I'm trying to make a chart where i got the ability to change datasource, so the charts look 1, 7 or 30 days back etc....

If i get the data from php using chart1.setDataSource(<?php echo json_encode($chartArray);?> then it works perfektly, how ever id like to make it getting the data from another file giving me the option to change datasets bit easier, and then using 


type: "GET",

url: "test.php",

data: {'getmessage': 'getmessage'},

dataType: "json",

success: function(data) {




How ever thats not working.

my test.php gives the same json dataset as before only just moved to the test.php file

Any ideas about where im going wrong? 

Oh and here is my array

Array ( 

[0] => Array (

[Procent rigtige] => 100

[Antal rigtige] => 4

[Antal mulige] => 4

[Date] => Januar-1970 )

[1] => Array (

[Procent rigtige] => 100

[Antal rigtige] => 4

[Antal mulige] => 4

[Date] => Februar-2014 )


Share this post

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now