bar - valueDomain
✓ Published0🌍 Public
NNPashaP
Last edited Dec 15, 2016
Created on Dec 15, 2016
This example demonstrates how the `viz.bar` API renders a grouped bar chart from an array of categorical values, with two side-by-side panels comparing default and explicitly specified value scales. The left panel uses the default domain inferred from the data, while the right panel sets a custom value domain of `[0,20]` via the `.valueDomain()` method, compressing the bars’ heights. The chart is built with D3 v4 and the `viz.js` library, rendering to SVG within a fixed 960×500 viewport, with blue rectangles and black strokes defined in CSS. The sample dataset contains six entries mapping categories A–D to values and series labels.
AI-generated descriptiongpl-3.0 Licensed