I am following this example from Google Chart documentation.
In the project all the existing graphs are plotted using ChartWrapper, so by following example I created this chart, now all I needed to do was replace the line where new Histogram instance is created with ChartWrapper.
i.e. Replace below code with:
let chart = new google.visualization.Histogram( document.getElementById("example") ); chart.draw(data, options);
Following code:
let wrapper = new google.visualization.ChartWrapper({ chartType: "Histogram", dataTable: data, options: options, containerId: "example_chartwrapper" }); wrapper.draw();
But it doesn't work and I am getting following error:
Invalid column index 1. Should be an integer in the range [0-0].
I have created two Code pen examples replicating this issue: