3.9.11.2Click notifications from event markers

If you specify wantClick:true in an event marker configuration, then the text setting becomes redundant and is not used, and the chart instead sends a message when a marker is clicked on.

You can receive these notifications using an OnMessage() handler, and listening for the EVENT_MARKER_MESSAGE message type. For example:

// Create an event marker with wantClick:true

Framework.ChartChange({

mode: "active", // or "all", or "single" plus a .chartId value

command: "create-event-marker",

marker: {

wantClick: true,

myMarkerId: "abc123", // Optional identifier which is received back in marker def

date: …

}

});

// Listen for clicks on the event marker

Framework.OnMessage = function(Msg) {

if (Msg.is(FXB.MessageTypes.EVENT_MARKER_MESSAGE)) {

// Msg.marker parameter contains the definition of the marker

// which has been clicked on. Msg.marker.myMarkerId will be "abc123".

}

};