0
votes

I'm using Column charts https://developers.google.com/chart/interactive/docs/gallery/columnchart of Google and it works fine. However, for some data I need horizontal charts. Bar char is suggested https://developers.google.com/chart/interactive/docs/gallery/barchart and I'm using it but this

      bars: 'horizontal' // Required for Material Bar Charts.

Doesn't work, namely, a chart is still vertical. Everything else is working fine.

What can be an issue? And what does "// Required for Material Bar Charts." mean?

1
@Dinesh, jsfiddle.net/api/post/library/pure is empty. What should I use to make it horizontal?Ko32mo

1 Answers

1
votes

there are two "versions" of google charts, Classic and Material...

Classic

loaded with --> packages: ['corechart']

Column Chart --> google.visualization.ColumnChart

Bar Chart --> google.visualization.BarChart


Material

loaded with --> packages: ['bar']

Both use the same chart --> google.charts.Bar

the chart option bars determines which direction the chart is displayed...

Column Chart --> bars: 'vertical'

Bar Chart --> bars: 'horizontal'