anychart.onDocumentReady(function () {
var dataTable = anychart.data.table();
["2016-12-24", 511.53, 514.98, 505.79, 506.40, 518.40],
["2016-12-25", 512.53, 514.88, 505.69, 507.34, 519.34],
["2016-12-26", 511.83, 514.98, 505.59, 506.23, 518.23],
["2016-12-27", 511.22, 515.30, 505.49, 506.47, 518.47],
["2016-12-28", 510.35, 515.72, 505.23, 505.80, 517.80],
["2016-12-29", 510.53, 515.86, 505.38, 508.25, 520.25],
["2016-12-30", 511.43, 515.98, 505.66, 507.45, 519.45],
["2016-12-31", 511.50, 515.33, 505.99, 507.98, 519.98],
["2017-01-01", 511.32, 514.29, 505.99, 506.37, 518.37],
["2017-01-02", 511.70, 514.87, 506.18, 506.75, 519.75]
mapping = dataTable.mapAs(
{open: 1, high: 2, low: 3, close: 4, value: 5}
var chart = anychart.stock();
var plot = chart.plot(0);
var line = plot.line(mapping);
var ohlc = plot.ohlc(mapping);
line.legendItem().useHtml(true);
ohlc.legendItem().useHtml(true);
line.legendItem().format(
"<span style='color:#455a64;font-weight:600'>{%seriesName}: " +
ohlc.legendItem().format(
"<span style='color:#455a64;font-weight:600'>{%seriesName}: " +
"</span>{%open} / {%high} / {%low} / {%close}"
chart.title("AnyStock Legend: Item Text Format (Individual Items + Tokens)");
chart.container("container");