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
$.ajax({
type: "GET",
url: "test.php",
data: {'getmessage': 'getmessage'},
dataType: "json",
success: function(data) {
chart1.setDataSource(data);
}
});
How ever thats not working.
my test.php gives the same json dataset as before only just moved to the test.php file
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
zeebaah
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
$.ajax({
type: "GET",
url: "test.php",
data: {'getmessage': 'getmessage'},
dataType: "json",
success: function(data) {
chart1.setDataSource(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
[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 )
)
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.