I have made a script which expects a parameter describing what dataset should be returned, and returns the data in JSON format:
I.e. trenddata.php?units= day, trenddata.php?units=week, trenddata.php?units=month
Note that each “units” type returns a different number of data results.
The script works fine when run from directly from the browser.
Now what I’m trying to do, is when a certain button from a buttongroup is pressed, is change the source.url appropriately, and refresh the data for the chart to display accordingly. i display an alert that shows that the source.url changed as it should, but the chart does not change… See code:
$('#buttonsTrend').on('buttonclick', function (event) { var clickedButton = event.args.button; //$("#eventsLog").text("Clicked: " + clickedButton[0].id); source.url="trenddata.php?units="+clickedButton[0].id; alert(source.url); source.localdata = generateData(), dataAdapter.dataBind();});
any idea on how to get this to work as expected?
thanks