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.
How a chart writes its numbers: the format an axis takes from its column, the one
notation and precision every tick of an axis shares, a bar’s label and a readout’s
value, all through one writer.
Chart view widget: the panel of shelves on the left (Type, X, Y, Color, then the
options), the plot on the right under its title, and the shared Picker over
them while a shelf is edited.
Each main-table column’s drawn width, kept by identity so the layout holds through
paging, scrolling, reordering and resizing. Automatic widths are learned from the
first page drawn (values already formatted, nothing read): text keeps it, bounded by
text_cap and clipped beyond; numbers, dates and flags only grow (clipped they
would read wrong). Sidebar-set widths win. A query, reshape, drill, sort or filter
relearns automatic widths; paging and scrolling never do.
The XY chart’s crosshair: a cursor that stands on a point’s x, steps to the next
point a column or more away, and a readout under the plot of every series’ value
there. Pure: the chart view draws it, the chart keys and a click move it.
Export modal rendering: a FormView, a row per field in one column, the
actions in the footer. Format is a Choice, so it is drawn as one: its values
side by side on its row, where ←/→ visibly step along them.
The row inspector: every field of the selected row and the focused field’s whole
value, as one Surface titled with the row. Under 140 columns the fields list above
the value; wider, fields fill columns on the left and the value runs full height on
the right. Tab moves focus (and the rail). The value pane wraps only on-screen rows
(crate::inspector::inspector_reader), so a 2 MiB value’s end is a key away.
The Pivot & Melt builder: one Surface over the whole screen, the form on the
left and a live preview of the result on the right, stacked on a narrow
terminal. The form is a FormRow per field with the one Picker below the rows;
the preview is the first rows of the reshaped head, typed and colored as the
table draws them, under a line that says what it ran over and the shape.
The dialog that writes the Data Quality report on screen to a file: a path and
a form, and a line saying what the form holds or why Enter did not write.
The text entry field used everywhere. Single-line inputs submit on Enter and recall
history with arrows; multi-line ones insert newlines and recall with Ctrl-P/Ctrl-N;
statements submit on Enter, break lines on Alt+Enter and wrap. Editing belongs to
crate::widgets::textarea::TextArea; this adds theming, focus and history.
Where an axis’s ticks fall: on nice numbers, 1, 2 or 5 times a power of ten, or
on calendar boundaries such as hours, days, months and years. Pure arithmetic;
crate::widgets::axes decides how many fit and draws them.