How do I put a Google Chart in Angular 4

前端 未结 2 1405
被撕碎了的回忆
被撕碎了的回忆 2021-02-08 16:58

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:04

    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

提交回复
热议问题