A wrapper for the Google Charts library written in Angular.
With npm installed, run
npm install @qrsln/GoogleChartsAngular
Import the GoogleChartsModule
in your app.module.ts
:
import { GoogleChartsModule } from 'angular-google-charts';
@NgModule({
...
imports: [
...
GoogleChartsModule,
...
],
...
})
export class AppModule {}
OR
Import the provideGoogleCharts
in your app.config.ts
:
import {provideGoogleCharts} from "@qrsln/google-charts-angular";
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideGoogleCharts({
version: 'current',
safeMode: true,
mapsApiKey: 'your-api-key'
}),
]
};
And create a GoogleChart
component somewhere in your application:
<GoogleChart
[title]="chart.title"
[type]="chart.type"
[data]="chart.data"
[columns]="chart.columns"
[options]="chart.options"
>
</GoogleChart>
Find the full readme at GitHub.
MIT