Tell us what works and what could be better. We read every submission.
@araft·3 public vizzes
This scatterplot visualizes the classic Iris dataset, plotting sepal length on the x-axis against sepal width on the y-axis. Each flower is represented as a circle colored by species using an ordinal color scale, with the circle radius mapped to petal length via a sqrt scale. Axes are rendered with D3 v4's axis components, and clicking a circle highlights it with a red stroke. The visualization includes axis labels and a legend (though the legend code is incomplete). Built with D3 v4, the example demonstrates a straightforward approach to multivariate data exploration through position, size, and color encoding.
Six vertical bars display six numeric values in a simple bar chart. The bars are positioned with `d3.scaleBand` along the x-axis and sized with `d3.scaleLinear` for the y-axis. Bar colors transition from blue to red based on value using a second `d3.scaleLinear` with a domain from the data extent. The SVG is rendered directly with D3 v4, using hardcoded data and a fixed 960 by 600 pixel canvas.
Four vertical red bars stand on an SVG canvas, with heights of 40, 60, 80, and 70 pixels. The bars are drawn as rectangles, each 40 pixels wide and spaced 50 pixels apart, starting at x-coordinate 100. The code uses D3 v4 to append SVG `rect` elements to a 960×500 canvas, positioning each bar’s baseline at y=200 and filling it with red. The dataset is a simple hardcoded array, and the rendering relies on D3’s selection and attribute methods.