Examples / Barplot · Resize Docs →

Resizing a barplot

The same two samples as the taxonomy example, but built with width: 700, barHeight: 60, maxItems: 8 and legend.columns: 4. There is no height to set: a barplot is as tall as the bars, the axis and the legend it holds. Narrow and Wide call resize() with a different width, which lays the bars, the axis and the legend columns out again without rebuilding the barplot. Fit to stage passes the width the stage has room for, which is what a page that follows its container does.