Google ChartWrapper doesn't work with Histogram charts

15 views
Skip to first unread message

Nimesh

unread,
Apr 9, 2018, 8:48:22 AM4/9/18
to Google Visualization API

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:

Histogram.png
Reply all
Reply to author
Forward
0 new messages