d4_shape

Graphical primitives for visualization, such as lines and areas.

license Dart CI pub package package publisher

Documentation

This package provides a variety of shape generators for your convenience. As with other aspects of D4, these shapes are driven by data: each shape generator exposes accessors that control how the input data are mapped to a visual representation.

See one of:

  • Arcs - circular or annular sectors, as in a pie or donut chart.
  • Areas - an area defined by a bounding topline and baseline, as in an area chart.
  • Curves - interpolate between points to produce a continuous shape.
  • Lines - a spline or polyline, as in a line chart.
  • Links - a smooth cubic BĂ©zier curve from a source to a target.
  • Pies - compute angles for a pie or donut chart.
  • Stacks - stack adjacent shapes, as in a stacked bar chart.
  • Symbols - a categorical shape encoding, as in a scatterplot.
  • Radial areas - like area, but in polar coordinates.
  • Radial lines - like line, but in polar coordinates.
  • Radial links - like link, but in polar coordinates.

Libraries

d4_shape
Visualizations can be represented by discrete graphical marks such as symbols, arcs, lines, and areas. While the rectangles of a bar chart may sometimes be simple, other shapes are complex, such as rounded annular sectors and Catmull–Rom splines. The d4_shape package provides a variety of shape generators for your convenience.