anychart.onDocumentReady(function () {
var chart = anychart.line();
chart.line([1, 2, 3, 4]);
chart.line([2, 3, 4, 1]);
chart.line([3, 4, 1, 2]);
chart.line([4, 1, 2, 3]);
var legend = chart.legend();
legend.position("right");
legend.itemsLayout("vertical");
chart.title("Get and modify legend object.");
chart.container("container");