All Components
Components

CHART_DIRECTIVES

A collection of all Chart directives.

Use the collection to quickly enumerate all Chart directives in the directives property of a @Component.

Instead of writing the code in the following example:

import { Component } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { ChartComponent, SeriesComponent, SeriesItemComponent } from '@progress/kendo-angular-charts';

@Component({
  selector: 'my-app',
  template: `
    <kendo-chart>
      <kendo-chart-series>
        <kendo-chart-series-item type="line" [data]="[1, 2, 3]">
        </kendo-chart-series-item>
      </kendo-chart-series>
    </kendo-chart>
  `,
  directives: [ChartComponent, SeriesComponent, SeriesItemComponent]
})
class AppComponent {
}

bootstrap(AppComponent);

It is possible for you to import all the Chart directives at once:

import { Component } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { CHART_DIRECTIVES } from '@progress/kendo-angular-charts';

@Component({
  selector: 'my-app',
  template: `
    <kendo-chart>
      <kendo-chart-series>
        <kendo-chart-series-item type="line" [data]="[1, 2, 3]">
        </kendo-chart-series-item>
      </kendo-chart-series>
    </kendo-chart>
  `,
  directives: [CHART_DIRECTIVES]
})
class AppComponent {
}

bootstrap(AppComponent);
In this article