Skip to content

Shapes

Shapes are the basic building blocks of graphics. They are used to create the visual elements of a graphic.

Usage

mark

The mark method is used to specify the shapes we place in each of the regions created by the flow operator.

chart(seafood).flow(spread('lake', { dir: 'x' })).mark(rect({ h: 'count' }));
          

ref

The ref method is used to reference a shape by its name.

chart(seafood).flow(spread('lake', { dir: 'x' })).mark(ref('rect')).render(root, { w: 500, h: 300 });
          

Components

name icon

name

Type: rect

A rectangle shape.

Uses the general usage patterns described above.

ellipse icon

ellipse

Type: ellipse

An ellipse shape.

Uses the general usage patterns described above.

petal icon

petal

Type: petal

A petal shape.

Uses the general usage patterns described above.