anychart.onDocumentReady(function() {
{x: "Chocolate paste", value: 5},
{x: "White honey", value: 2},
{x: "Strawberry jam", value: 2},
{x: "Condensed milk", value: 1}
var chart = anychart.column(data);
chart.title("Export data sample");
chart.container("container");
chart.bounds(0, 0, chart.container().width()-35, chart.container().height());
var csvButton = document.createElement("div");
var xlsxButton = document.createElement("div");
csvButton.className = "custombutton";
xlsxButton.className = "custombutton";
csvButton.innerHTML = "CSV";
xlsxButton.innerHTML = "XLSX";
csvButton.onclick = function() {
xlsxButton.onclick = function() {
container.appendChild(csvButton);
container.appendChild(xlsxButton);
var custombuttons = document.getElementsByClassName("custombutton");
for (var i = 0; i<custombuttons.length; i++){
custombuttons[i].style.top = 45*i + "px";
custombuttons[i].style.right = "5px";
custombuttons[i].style.width = "50px";
custombuttons[i].style.height = "auto";
custombuttons[i].style.backgroundColor = "#444444";
custombuttons[i].style.color = "white";
custombuttons[i].style.fontFamily = chart.title().fontFamily();
custombuttons[i].style.position = "absolute";
custombuttons[i].style.zIndex = 2;
custombuttons[i].style.transition = "0.5s";
custombuttons[i].style.textAlign = "center";
custombuttons[i].style.border = "3px solid #444444";
custombuttons[i].style.borderRadius = "7px 7px 7px 7px";
custombuttons[i].style.fontSize = "18px";
custombuttons[i].style.cursor = "pointer";