Adding Key Axis
✓ Published0🌍 Public
NNPashaP
Last edited Dec 15, 2016
Created on Dec 13, 2016
Four bar charts display the same categorical dataset with five values, each docking the chart’s axis to a different side: left, right, top, or bottom. The code uses the viz.js `viz.bar()` function to generate the bars and `dock()` to position them. It then adds a key axis using `d3.axisLeft`, `d3.axisRight`, `d3.axisTop`, or `d3.axisBottom` with the bar’s keyScale, translating the axis to the zero line via `valueScale()(0)`. The bars are rendered as SVG rectangles.
AI-generated descriptiongpl-3.0 Licensed