Last active
February 3, 2019 16:41
-
-
Save AvocadoVenom/d0f9ae78b118b37029899e47f1558f29 to your computer and use it in GitHub Desktop.
d3 responsive charts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngOnInit() { | |
// ... | |
window.addEventListener('resize', this.resize.bind(this)); | |
} | |
private resize() { | |
this.setSVGDimensions(); | |
this.setAxisScales(); | |
this.repaint(); | |
} | |
private repaint() { | |
this.drawAxis(); | |
this.drawBars(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngOnInit() { | |
// ... | |
window.addEventListener('resize', this.resize.bind(this)); | |
} | |
private resize() { | |
this.setSVGDimensions(); | |
this.setArcs(); | |
this.repaint(); | |
} | |
private repaint() { | |
this.drawSlices(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment