To remove an event marker, you first need to capture its
For example, creating a marker and recording the
// Create a marker, storing the ID for future use (for example, in Framework.$myMarkerId)
Framework.ChartChange({
mode: "active", // or "all", or "single" plus a .chartId value
command: "create-event-marker",
marker: { … }
}, function (MsgResponse) {
if (MsgResponse.result.success) {
// Event marker added. Store the ID for later use:
Framework.$myMarkerId = MsgResponse.result.markerId;
} else {
// Failed.
// Textual error message in MsgResponse.result.error
}
});
You can then later remove the marker as follows:
Framework.ChartChange({
mode: "active", // or "all", or "single" plus a .chartId value
command: "remove-event-marker",
markerId: Framework.$myMarkerId
});