anychart.onDocumentReady(function () {
{x: 'Development', low: Date.UTC(2000, 1, 1), high: Date.UTC(2002, 2, 15)},
{x: 'Internal Testing', low: Date.UTC(2001, 6, 1), high: Date.UTC(2003, 7, 1), fill: '#1976D2'},
{x: 'Field Tests', low: Date.UTC(2002, 2, 25), high: Date.UTC(2003, 7, 1), fill: '#EF6C00'},
{x: 'Licensing', low: Date.UTC(2003, 7, 1), high: Date.UTC(2004, 7, 1), fill: '#FFD54F'}
chart.margin([0, '45%', 0, 0]);
chart.title('Get chart data as CSV with parameters using function');
chart.container('container');
var value = chart.toCsv('default', {
formats: function(header, val) {
if (header == 'low' || header == 'high')
return anychart.format.dateTime(val, 'yyyy-MMM-dd');
var csv = document.getElementById('csv');