anychart.onDocumentReady(function () {
var chart = anychart.line([6, 10, 18, 11, 9]);
chart.yScale().minimum(0);
var controller = chart.annotations();
var annotation = chart.annotations().getAnnotationAt(0);
chart.title("Get selected annotation.");
chart.container("container");
controller.select(annotation);
var selectedAnnotation = controller.getSelectedAnnotation();
var type = selectedAnnotation.getType();
chart.title("Get selected annotation and get type - " + type + ".");