Google Chart vAxis values are not showing

前端 未结 4 1678
醉话见心
醉话见心 2021-01-15 00:02

I am working on various graphs and I am showing multiple graphs in a single page. Somehow vAxis values are not showing on some graphs but it showing in some independent (we

4条回答
  •  既然无缘
    2021-01-15 00:25

    Its a bit of a silly setting from Google Prior to version 45 there was no issue as long as you set the width correctly.

    eg: 'width':$('.tab-container').width()

    Now even when you manually specify the height and width of the chart Google cant calculate it correctly- but it only affects the labels, not the rest of the chart.

    Drawing the chart on tab load is a bit of a pain, as another recent change made it more important to use google.charts.setOnLoadCallback() - otherwise some charts will fail to draw in some browsers due Google load timing.

    Manually setting to version 45 seems the best solution for legacy charts without re-writing all the code.

提交回复
热议问题