anychart.onDocumentReady(function () {
var chart = anychart.gauges.linear([300, 250, 150]);
chart.addPointer(0, 1, 2);
var legend = chart.legend();
legend.position('right');
legend.itemsLayout('vertical');
chart.title('Get and modify legend object');
chart.container('container');