Skip to main content

Module plot

Module plot 

Source
Expand description

The charts of a dashboard: the same numbers as crate::chart, laid out for a screen. Besides what to draw, it says where each thing landed, so that whoever shows it can tell what is under the pointer without asking for another picture.

crate::chart stays as it is, so documents already printed keep their looks.

Structs§

Bar
A bar as it landed, for drawing it again over the picture.
Candle
What a price did in a category of a ChartKind::Candlestick.
Hit
What is under a point of the chart.
Mark
A value’s place on the chart: where a dot goes, or an active marker.
Plot
A chart laid out.
PlotStyle
The look of a chart. Start from PlotStyle::new and change what differs.
Reference
A dashed line across a chart at a value that matters.
Rule
A thin straight line left out of the picture.
Sector
A slice of a circle or of a ring, for telling what is under the pointer.
Spot
A category of a chart with axes, and the strip of the chart that belongs to it.

Enums§

Curve
How a line goes from one point to the next.
Grid
Which gridlines a chart has, as they look on the screen.
LabelAt
Where a label sits relative to what it names.
PolarGrid
The shape of the grid of a radar or radial chart.
Stack
How series share the same category.

Functions§

curve_through
The path through points, without its starting move.
draw
Lays a chart out inside rect.
draw_measured
Lays a chart out inside rect, knowing how wide its labels really are.
draw_small
Lays out a scatter chart or a sparkline just as crate::chart does, and says where each value landed: each one owns the strip from halfway to its neighbors.
gapped_slice
A slice as slice_path draws it, with gap left clear all around it: half on each of its sides, of the same width all the way, and half at its ends. What is behind the chart shows through.
rules_around_bars
Gridlines stop where a bar starts and go on where it ends.
slice_path
A slice of a ring around center; a slice of a circle when inner is zero.
value_range
Where a cartesian chart’s value axis starts and ends for this data, as drawing it picks: to ease from one set of data to another along a scale that moves with them, give the frames in between a PlotStyle::domain between the two.

Type Aliases§

Measure
How wide text is at a font size, for whoever knows its font.