Skip to main content
100%

D3.js Boxplot with Axes and Labels

✓ Published0🌍 Public
Aanaeliaovalle
Last edited Mar 16, 2017
Created on Mar 14, 2017

This example shows a box-and-whisker plot built with D3.js (v3) that visualizes measurements across multiple categorical variables, with each column in the CSV representing an independent variable and each row containing measurements for all variables. The chart renders all boxplots in a single root SVG element, making it straightforward to add axes and labels. The implementation supports toggling label visibility via a `showLabels` variable and accepts CSV input where each column is a variable. It is based on Mike Bostock's boxplot design, adapted to group all plots in one root element for easier axis integration. The visualization uses SVG rendering and is available under the MIT license.

AI-generated description

A box-and-whisker plot with axes. Based on Mike Bostock's implementation. Instead of using individual svg elements as in Mike's implementation, here all boxplots are rendered with in one root element. This makes it easy to add axes.

Further differences between the two implementations are:

  • visibility of boxplot labels can be switched with the labels variable
  • CSV files are supported in which each column is an independent variable and each row contains measurements for all variables (see data.csv)
  • transitions are not used here but can be easily added again

forked from <a href='http://bl.ocks.org/jensgrubert/'>jensgrubert</a>'s block: <a href='http://bl.ocks.org/jensgrubert/7789216'>D3.js Boxplot with Axes and Labels</a>

mit Licensed

Similar vizzes