anychart.onDocumentReady(function () {
var dataTable = anychart.data.table();
dataTable.addData(get_csco_daily_data());
var mapping = dataTable.mapAs({
'value': {column: 4, type: 'close'}
var indicatorMapping = dataTable.mapAs({
var chart = anychart.stock();
var plotSeries = chart.plot(0);
var plotIndicator = chart.plot(1);
plotSeries.ohlc(mapping).name('CSCO');
plotIndicator.bbandsB(indicatorMapping);
chart.scroller().line(mapping);
plotIndicator.legend().itemsFormat(function() {
if (this.seriesName.indexOf('BBands %B') != -1)
return this.seriesName + ': ' + this.value.toFixed(3);
chart.container('container');