• Version 3.0.7
  • Published
  • 155 kB
  • 2 dependencies
  • ISC license


npm i ng2-charts
yarn add ng2-charts
pnpm add ng2-charts


Reactive, responsive, beautiful charts for Angular based on Chart.js



variable baseColors

const baseColors: number[][];


    class BaseChartDirective

    class BaseChartDirective<
    TType extends ChartType = ChartType,
    TData = DefaultDataPoint<TType>,
    TLabel = unknown
    > implements OnDestroy, OnChanges {}


      constructor(element: any, zone: any, themeService: ThemeService);

        property chart

        chart?: any;

          property chartClick

          chartClick: any;

            property chartHover

            chartHover: any;

              property ctx

              ctx: string;

                property data

                data?: any;

                  property datasets

                  datasets?: any;

                    property labels

                    labels?: any;

                      property legend

                      legend?: boolean;

                        property options

                        options?: any;

                          property ɵdir

                          static ɵdir: any;

                            property ɵfac

                            static ɵfac: any;

                              property plugins

                              plugins?: any;

                                property type

                                type: any;

                                  method hideDataset

                                  hideDataset: (index: number, hidden: boolean) => void;

                                    method isDatasetHidden

                                    isDatasetHidden: (index: number) => boolean | undefined;

                                      method ngOnChanges

                                      ngOnChanges: (changes: any) => void;

                                        method ngOnDestroy

                                        ngOnDestroy: () => void;

                                          method render

                                          render: () => any;

                                            method toBase64Image

                                            toBase64Image: () => string | undefined;

                                              method update

                                              update: (duration?: any) => void;

                                                class NgChartsConfiguration

                                                class NgChartsConfiguration {}

                                                  property defaults

                                                  defaults?: any;

                                                    property ɵfac

                                                    static ɵfac: any;

                                                      property ɵprov

                                                      static ɵprov: any;

                                                        property plugins

                                                        plugins?: any[];

                                                          class NgChartsModule

                                                          class NgChartsModule {}


                                                            constructor(config?: NgChartsConfiguration);

                                                              property ɵfac

                                                              static ɵfac: any;

                                                                property ɵinj

                                                                static ɵinj: any;

                                                                  property ɵmod

                                                                  static ɵmod: any;

                                                                    method forRoot

                                                                    static forRoot: (config?: NgChartsConfiguration) => any;

                                                                      class ThemeService

                                                                      class ThemeService {}



                                                                          property colorschemesOptions

                                                                          colorschemesOptions: any;

                                                                            property ɵfac

                                                                            static ɵfac: any;

                                                                              property ɵprov

                                                                              static ɵprov: any;

                                                                                method getColorschemesOptions

                                                                                getColorschemesOptions: () => any;

                                                                                  method setColorschemesOptions

                                                                                  setColorschemesOptions: (options: any) => void;

                                                                                    Package Files (5)

                                                                                    Dependencies (2)

                                                                                    Dev Dependencies (0)

                                                                                    No dev dependencies.

                                                                                    Peer Dependencies (4)


                                                                                    To add a badge like this badgeto your package's README, use the codes available below.

                                                                                    You may also use to create a custom badge linking to

                                                                                    • Markdown
                                                                                    • HTML
                                                                                      <a href=""><img src="" alt=""></a>