ShapesΒΆ
Visualizations can be represented by discrete graphical marks such as symbols, arcs, lines, and areas.
Each shape generator exposes accessors that control how the input data are mapped to a visual representation. For example, you might define a line generator for a time series by scaling fields of your data to fit the chart:
line = d3.line().x(lambda d: x(d["date"])).y(lambda d: y(d["value"]))
This line generator can then be used to compute the d attribute of an SVG path element:
svg.attr("d", line(data))
Contents:
- Arcs
- Areas
- Curves
curve_basis()curve_basis_closed()curve_basis_open()curve_bump_x()curve_bump_y()curve_bundle()curve_cardinal()curve_cardinal_closed()curve_cardinal_open()curve_catmull_rom()curve_catmull_rom_closed()curve_catmull_rom_open()curve_linear()curve_linear_closed()curve_monotone_x()curve_monotone_y()curve_natural()curve_step()curve_step_after()curve_step_before()- Custom curve
- Lines
- Links
- Pies
- Stacks
- Symbols
- Radial Areas
- Radial Lines