anychart.onDocumentReady(function() {
stage = anychart.graphics.create("container");
var dataTable = anychart.data.table();
dataTable.addData(get_csco_daily_short_data());
var mapping = dataTable.mapAs({"value": 4});
chart = anychart.stock();
var plot = chart.plot(0);
var lineSeries = plot.line(mapping);
var controller = plot.annotations();
chart.title("Drawing Annotations");
createLabel("Ellipse", 10, function() {
controller.startDrawing("ellipse");
createLabel("Rectangle", 70, function() {
controller.startDrawing("rectangle");
createLabel("Triangle", 155, function() {
controller.startDrawing("triangle");
createLabel("Remove All", 240, function() {
controller.removeAllAnnotations();
function createLabel(text, offset, action){
var label = anychart.standalones.label();
label.background({fill: "#1976d2"});
label.parentBounds(offset, 5, 130, 100);
label.listen("click", action);
label.listen("mouseOver", function(){
label.background().fill("#1976d2 0.5");
document.body.style.cursor = "pointer";
label.listen("mouseOut", function(){
label.background().fill("#1976d2");
document.body.style.cursor = "auto";