Chartjs-How to open a new Tab with javascript and display some chart

0👍

You are trying to find the node from the wrong document. This solution is working:

    var w=window.open("");
    w.document.body.innerHTML += '<div id="chart"></div>';

    chart = new google.visualization.ColumnChart(w.document.getElementById("chart"));
    chart.draw(dataTable, options);

Leave a comment