Configure chart theme

Configure the chart theme for all G2, but only provide interfaces. For the configuration chart theme parameters, please refer to G2 website.

  1. // global-config.module.ts
  2. const alainConfig: AlainConfig = {
  3. chart: { theme: 'dark' },
  4. };
  5. export class DelonModule {
  6. static forRoot(): ModuleWithProviders {
  7. return {
  8. ngModule: DelonModule,
  9. providers: [
  10. { provide: ALAIN_CONFIG, useValue: alainConfig }
  11. ]
  12. };
  13. }
  14. }