Event Markers Events
Overview
Using AnyChart Event handling with Event Markers allows you to integrate them in your application in more deep and meaningfull way.
Events
To handle event markers events listen to appropriate events like this:
// show info when
chart.listen('eventmarkermouseover', function (e) {
var symbol = e.eventMarker.symbol;
var description = e.eventMarker.description;
var date = e.eventMarker.date;
document.getElementById('info').innerHTML = symbol + "@" + anychart.format.date(date) + ":" + description;
});
// reset text when mouse leaves a marker
chart.listen('eventmarkermouseout', function () {
document.getElementById('info').innerHTML = "";
chart.title("Event Marker Events: Move the mouse over or click markers");
});
// open new window on click
chart.listen('eventmarkermouseclick', function () {
window.open("https://www.google.ru/search?q=" + e.eventMarker.description);
});
Attach List Element
Here is a sample of attaching a list element: Event Markers with Sidebar List
Create HTML Tooltips
Creating HTML tooltips is shown in Tooltips article.
Display info box
Coming soon.