feat: a span declared invalid is shaded behind the data it is missing from
This commit is contained in:
1 parent
1ae72d4903
commit
ebc67bd318
6 files changed
+250
No files matched your search
@@ -513,6 +513,12 @@ class Renderer {
|
||||
void draw_plot(Plot& plot, const PlotLayout& layout);
|
||||
|
||||
void draw_grid(const Plot& plot);
|
||||
/// `Plot::invalid_spans()`, as `PlotLayout::invalid_spans` measured them: one fill per span in
|
||||
/// `style_.invalid_fill`. Over the grid and under everything else inside the axes, so a hole
|
||||
/// reads as a property of the plot's background -- the grid shows through it and a trace that
|
||||
/// does have data in those columns is drawn on top, which is what distinguishes a reserved
|
||||
/// hole from a trace that has gone quiet.
|
||||
void draw_invalid_spans(const PlotLayout& layout);
|
||||
void draw_axis_lines(const Plot& plot);
|
||||
/// The chrome helpers take the frame's layout: `Plot::layout()` recomputes the
|
||||
/// ticks, the strips and the grid, so it is computed once, in `draw()`, and handed
|
||||
|
||||
@@ -55,6 +55,13 @@ struct Style {
|
||||
Color axis_text = Color::hex(0xC8D0DC);
|
||||
Color cursor = Color::hex(0xFFB020);
|
||||
Color measure_fill = Color::hex(0xFFB020, 0.15f);
|
||||
/// The shading over a span the host has declared invalid (`Plot::set_invalid_spans()`): the
|
||||
/// axis furniture's own neutral grey at a low alpha, on the same model as `measure_fill`
|
||||
/// above. Neutral and not a trace colour on purpose -- a band is the *absence* of data, and
|
||||
/// one in a hue a trace could have would read as a signal rather than as a gap. The alpha is
|
||||
/// low enough that the grid under it stays legible, which is what makes the band read as a
|
||||
/// region of the plot rather than as a panel laid over it.
|
||||
Color invalid_fill = Color::hex(0x8A94A6, 0.18f);
|
||||
/// The crosshair's colour: its two lines and the readout panel's border (spec §15). Markers are
|
||||
/// deliberately *not* this colour -- they carry each trace's own, because a marker says *which*
|
||||
/// trace and the line says *where*.
|
||||
|
||||
Reference in new issue
Block a user