Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
The #chart id will be used to get a reference to the native element.
The components size, colors and other attributes can be controlled with CSS. The default component styles are defined barchart.component.css:
.d3-chart {
width: 100%;
height: 400px;
.d3-chart .axis path,
.d3-chart .axis line {
stroke: #999;
.d3-chart .axis text {
fill: #999;

This comment has been minimized.

Copy link

commented Sep 14, 2017

Thank you so much for the tutorial! Note that the two lines on top should be commented out. Otherwise the div element of the bar chart is set to height & width zero, and the bars won't show (tested in Chrome).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.