7.1.2 • Published 10 months ago

@michelin/charts v7.1.2

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

Angular Michelin charts

The package is a library to build charts in Angular applications.

This library is based on Chart.js 4

Usage

Internal with Artifactory : @michelin/charts External with NPM : @michelin/charts

1. Install Michelin Theme

Make sure Michelin theme is correctly installed.

2. Install Michelin Charts

  • Install chart.js npm i chart.js, (version >= 4.0.0)
  • Install michelin chart plugin npm i @michelin/charts

3. Include Michelin Charts modules

Michelin modules can be imported in the shared module

For example :

import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { ChartModule } from '@michelin/charts';

@NgModule({
  imports: [
    CommonModule,
    ChartModule
  ],
  providers: [],
  declarations: []
})
export class SharedModule {}

4. Moment adapter

Moment adpater can be use to display timeseries

  • Install moment adapter plugin npm i chartjs-adapter-moment, (version > 1.0.0)
  • Import dependency before chart initialization :
import 'chartjs-adapter-moment';

5. Install plugins

Plugins can be register with ChartService.

For example for a Zoom plugin :

  • Install zoom plugin npm i chartjs-plugin-zoom, (version > 1.0.0)
  • Register plugin globally :
import { Component } from '@angular/core';
import { ChartService } from '@michelin/charts';

import zoomPlugin from 'chartjs-plugin-zoom';

@Component({
  selector: 'mic-root',
  template: '<router-outlet></router-outlet>'
})
export class AppComponent {
  constructor(chartService: ChartService) {
    chartService.addPlugins([zoomPlugin]);
    chartService.registerPlugins();
  }
}
6.3.0

1 year ago

6.3.2

1 year ago

6.3.1

1 year ago

7.0.0

1 year ago

7.1.2

10 months ago

7.1.1

10 months ago

5.4.4

1 year ago

7.1.0

10 months ago

6.2.0

1 year ago

6.1.0

1 year ago

6.0.0

1 year ago

5.4.3

1 year ago

5.4.2

1 year ago

5.4.1

2 years ago

5.4.0

2 years ago

5.3.1

2 years ago

5.3.0

2 years ago

5.2.0

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago