I wonder if anyone can point me in the right direction with the following:
Setup:
Two UX panels, one with a list of accounts, another with a chart control (which is supposed to chart expenditure, burn-rate, etc. data for an account selected in panel 1)
Selecting an account in panel 1 activates panel 2, which has the (native) chart
Problem:
I have managed to update a label in panel 2, showing which account was selected in the list in panel 1.
I can't figure out how to orchestrate the chart refresh so that it filters the list on the selected account number. I've tried calling active javascript and passing the selected account number to the chart Xbasic routine, but the problem with that approach is that teh active javascript cannot refresh the chart using the Xbasic chart data return value, because chart, apparently, doesn't support the setvalue -method. I tried running active javascript something like this:
where getMonthlyAccountExpenditures is the Xbasic code that queries the database and returns a pipe-delimited string, and MonthlyAccountExpenditures is the name of the chart variable. The setvalue method returned error that the object doesn't support setvalue, so I'm stuck.
I guess the question really boils down to this: Is there any way to insert a value directly into a chart's Field Properties/Variable name and refresh the chart without triggering another trip to the Xbasic code, all this using javascript?
I may have to try Google graph instead, maybe it is more approachable...
Setup:
Two UX panels, one with a list of accounts, another with a chart control (which is supposed to chart expenditure, burn-rate, etc. data for an account selected in panel 1)
Selecting an account in panel 1 activates panel 2, which has the (native) chart
Problem:
I have managed to update a label in panel 2, showing which account was selected in the list in panel 1.
I can't figure out how to orchestrate the chart refresh so that it filters the list on the selected account number. I've tried calling active javascript and passing the selected account number to the chart Xbasic routine, but the problem with that approach is that teh active javascript cannot refresh the chart using the Xbasic chart data return value, because chart, apparently, doesn't support the setvalue -method. I tried running active javascript something like this:
Code:
var chartValue = {dialog.object}.ajaxCallback('','','getMonthlyAccountExpenditures','','_var='+AccountNumber,{deviceOfflineFunction: function() { }}); {dialog.object}.setvalue('MonthlyAccountExpenditures',chartValue);
I guess the question really boils down to this: Is there any way to insert a value directly into a chart's Field Properties/Variable name and refresh the chart without triggering another trip to the Xbasic code, all this using javascript?
I may have to try Google graph instead, maybe it is more approachable...
Comment