Before modifying a chart, the creator must first obtain the ID of the chart, via the callback issued by
Framework.CreateDialog({
type: "chart",
…
}, function (MsgResponse) {
if (MsgResponse.widgetId) {
// Initial callback on creation
// MsgResponse.widgetId can be used to modify the chart,
// using ChartChange() with mode: "single" and chartId: <widgetId>
} else {
// Subsequent callback from dialog after creation
}
});
Framework.CreateSubWidget({
type: "chart",
domTarget: document.getElementById("MyChartContainer"),
…
}, function (MsgResponse) {
// Initial callback on creation
// MsgResponse.widgetId can be used to modify the chart,
// using ChartChange() with mode: "single" and chartId: <widgetId>
});