anychart.onDocumentReady(function () {
var chart = anychart.sparkline([1.3, 2, 1.4, 4, 2.3, 6]);
var contextMenu = chart.contextMenu();
contextMenu.itemsFormatter(function (items) {
text: 'Custom Context Menu Item',
function actionHandler() {
alert('Custom Item Clicked');
chart.title({text: 'Get and modify context menu. Right-click on the chart', orientation: 'top'});
chart.container('container');