Skip to content

Commit

Permalink
feat: make charts resizeable
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 23, 2020
1 parent 5477a04 commit dc293ff
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ export class MarkdownRenderComponent implements OnInit, OnChanges, AfterViewInit
}
}

@HostListener('window:resize', ['$event'])
onResize(event) {
for (const chartInstance of this.chartInstances) {
chartInstance.resize();
}
}

@HostListener('window:scroll', ['$event'])
handleScroll() {
const windowScroll = window.pageYOffset;
Expand Down

0 comments on commit dc293ff

Please sign in to comment.