Expand description
Axis ticks, labels, titles and grid for every chart. ratatui would cut or run labels
together and draw titles over the plot, so datui picks ticks and draws labels and
marks itself. Ticks fall on nice values (1, 2 or 5 times a power of ten, or calendar
boundaries), about one label per 15 columns or 4 rows, never closer than two cells: a
crowded axis takes a coarser step, then shorter labels (12.3k, yearless dates),
keeping a fixed axis’s ends while anything fits. A title gets its own row, cut to
fit, or is dropped.
Structs§
- Axis
Spec - One axis: its range, how its ticks are chosen and written, and its title.
- Legend
- A chart’s legend: a name per series, each in the style its series draws in.
- Placed
- An axis’s ticks as placed: each labeled tick’s cell and label, and the cells of every major and minor tick.
- Plot
Axes - A chart’s two axes and how they are drawn.
- Plot
Frame - Where a chart’s parts sit in its area.
- TickSet
- A way to tick an axis: where, the minor ticks between, and the labels at each level of detail.
- Track
- Where an axis’s values land on screen:
cellscells fromstart, each split insubdots by the marker the plot draws with.
Functions§
- cut
textin at mostwidthcells, cut with the ellipsis when longer.- fit_
x_ labels - The x labels fitting a row over columns
spanunder a plot oftrack, each centered under its tick, kept on the row,LABEL_GAPcells apart: about one per 15 columns, coarser then shorter when crowded, none when even two do not fit. - fit_
y_ labels - The y labels for a plot whose rows are
track, with at mostwidthcells left of its axis: about one per four rows, each on its tick’s row, in the fullest form that fits the width and tells them apart. - resolution
- The dots per cell, across and down, of a canvas drawn with
marker.
Type Aliases§
- Tick
Label - A tick’s label at a level of detail, 0 the fullest;
Nonepast the shortest.