anychart.onDocumentReady(function () {
var chart = anychart.pyramid([
{x: 'Physical', value: 125},
{x: 'Data Link', value: 135},
{x: 'Network', value: 125},
{x: 'Transport', value: 145},
{x: 'Session', value: 125},
{x: 'Presentation', value: 155},
{x: 'Application', value: 290}
var contextMenu = chart.contextMenu();
contextMenu.itemsFormatter(function (items) {
text: 'Custom Context Menu Item',
function actionHandler() {
alert('Custom Item Clicked');
chart.title('Get and modify context menu. Right-click on the chart');
chart.container('container');