How do I put a Google Chart in Angular 4

前端 未结 2 754
灰色年华
灰色年华 2021-02-08 16:31

How do you integrate a google chart in an angular 4 application?

I read the answer to the SO question here, but I believe it\'s incomplete. Basically, I\'m attempting t

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-08 17:24

    google.visualization.BarChart is part of the 'corechart' package

    need to change the load statement...

      google.charts.load('current', {
        'packages': ['corechart']
      });
    

    the 'bar' package is for the Material chart version
    which would be --> google.charts.Bar

    however, there are many config options that are not supported by Material charts...

    for the full list of unsupported options --> Tracking Issue for Material Chart Feature Parity

提交回复
热议问题