Expand description
Reasonable default builders for a figgy chart.
The Default trait is intentionally not implemented for the chart types;
values that carry user intent (titles, data ranges) must go through builders
like Chart::with_title. This module only provides visual / layout defaults
that work for any chart. (Sole exceptions: DrawStyle / SketchOptions —
pure visual parameters with no user intent, and serde(default) requires
the impls.)
Included: visual style (colors, widths, font sizes, tick lengths, grid), axis visibility policy (all axis lines and inside ticks on; top/right labels and titles off, bottom/left labels and titles on), units / formatting (Linear, Decimal, 3 sig digits), and margins.
Not included (caller supplies): chart and axis text (empty segments —
filled in by builders), axis range (0..1 placeholder updated by
Chart::set_*_range or auto_fit_*), and chart_area pixel size (set to
match the host viewport).
Functions§
- default_
axis_ options_ colorbar - The colourbar’s z axis. Range is a 0..1 placeholder — replace with the matrix’s z statistics.
- default_
axis_ options_ x - X axis options. Range is a 0..1 placeholder — replace with
Chart::set_x_rangeorauto_fit_x. - default_
axis_ options_ y - Y axis options. Range is a 0..1 placeholder — replace with
Chart::set_y_rangeorauto_fit_y. - default_
axis_ title_ options - Axis title style. Text starts empty and is filled in by a builder.
- default_
chart_ area - chart_area placeholder — caller resizes to match the host viewport.
- default_
chart_ title_ options - Chart title style. Text starts empty and is filled in by a builder.
- default_
colorbar_ options - Colourbar defaults — visible, on the right, three quarters of the data
area’s height, Viridis.
nan_coloris fully transparent: a value the ramp cannot place reads as absent rather than as some particular colour. - default_
config - Reasonable default Config.
- default_
grid_ options - Major grid on, minor grid off. Light gray lines.
- default_
label_ style_ x - Tick label style (X axis).
- default_
label_ style_ y - Tick label style (Y axis). Currently identical to X.
- default_
legend - Legend defaults — hidden, top-right corner, standard padding. Content starts empty; its font/font_size are live and consumed at draw time.
- default_
rich_ text - Empty RichText (no segments). Filled in by builders.