Skip to content

Commit

Permalink
fix(chartist-cmp): events should be bound with every new chart initia…
Browse files Browse the repository at this point in the history
…lization.
  • Loading branch information
hakimio committed Jan 18, 2019
1 parent f4a894f commit ba78c62
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions projects/ng-chartist/src/lib/chartist.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ export class ChartistComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit(): void {
if (this.type && this.data) {
this.renderChart();
if (this.events) {
this.bindEvents();
}
}
}

Expand Down Expand Up @@ -101,6 +98,10 @@ export class ChartistComponent implements OnInit, OnChanges, OnDestroy {
this.options,
this.responsiveOptions
);

if (this.events) {
this.bindEvents();
}
}

private update(changes: SimpleChanges): void {
Expand Down

0 comments on commit ba78c62

Please sign in to comment.