I pass parameters to the JS function using the js_call_amd function:
$PAGE->requires->js_call_amd('report_ortpblit/chart_groups_progress', 'createGraph', $params);
(The JS file is called 'chart_groups_progress.js' and the function to run is 'createGraph'.)
The documentation states that "the $params is an array of params passed as arguments to the function.", but I'm unable to use the $params as an array: When I put data in the 2nd and 3rd offsets ($params, $params…), the 'createGraph' function only gets the data in the 1st offset (($params).
How do I use the rest of the array inside the JS function?