anychart.onDocumentReady(function () {
var dataTable = anychart.data.table();
["2016-12-24", 511.53, 506.40],
["2016-12-25", 512.53, 507.34],
["2016-12-26", 511.83, 506.23],
["2016-12-27", 511.22, 506.47],
["2016-12-28", 510.35, 505.80],
["2016-12-29", 510.53, 508.25],
["2016-12-30", 511.43, 507.45],
["2016-12-31", 511.50, 507.98],
["2017-01-01", 511.32, 506.37],
["2017-01-02", 511.70, 506.75]
mapping1 = dataTable.mapAs({value: 1});
mapping2 = dataTable.mapAs({value: 2});
var chart = anychart.stock();
var plot = chart.plot(0);
plot.legend().itemsFormatter(function(legendItems) {
text: "/ Number of Series: " + plot.getSeriesCount() + " /",
chart.title("AnyStock Legend: Custom Items");
chart.container("container");