I am following this 
<https://google-developers.appspot.com/chart/interactive/docs/gallery/histogram_838632b69bba9339da6b460362e8c582.frame?hl=en>
 
example from Google Chart documentation 
<https://developers.google.com/chart/interactive/docs/gallery/histogram>.


In the project all the existing graphs are plotted using ChartWrapper 
<https://developers.google.com/chart/interactive/docs/reference#chartwrapper-class>,
 
so by following example I created this chart 
<https://codepen.io/anon/pen/YadLyG>, 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:

   - Uses my example data: https://codepen.io/anon/pen/YadLyG
   - Uses example data from Chart documentation: 
   https://codepen.io/anon/pen/QmzrvZ

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/8d9670e4-d059-44e7-899d-4305d8ab5769%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to