Added
-
X and Y axis labels via
Config::x_axis_label()andConfig::y_axis_label().
The Y-axis label renders flush left above the graph body. The X-axis label
renders inline on the same row as the axis line, to the right of the tick
marks. The X-axis label only appears whenx_axis_rangeis also configured. -
Added
examples/axis_labels.rsdemonstrating both labels on a 20-point
dataset with a configured X-axis range. -
Serde support via an optional
serdefeature flag. Add
asciigraph = { version = "0.1.5", features = ["serde"] }to enable
SerializeandDeserializeforConfig,AnsiColor,CharSet,
ZeroLine, andThreshold. Formatter closure fields are skipped during
serialization as functions cannot be represented as data. -
Added
examples/serde_config.rsdemonstrating serialization and
deserialization ofConfigto and from JSON usingserde_json. -
Statistical annotations via
StatAnnotations— opt-in horizontal reference
lines computed automatically from the data and rendered with inline labels.
Supports minimum, maximum, mean, median, and standard deviation (rendered
as two lines at ±σ). Each annotation uses a distinct dashed character for
visual clarity. When two annotation values map to the same grid row, their
labels are stacked and separated by a comma. In multi-series graphs, the
target series is configurable viaseries_index. Enabled through
Config::stat_annotations(). -
Added
examples/stat_annotations.rsdemonstrating all five annotations
rendered in yellow over a 20-point dataset.
Changed
-
Thresholdnow supportsseries_index— each threshold is associated
with a specific series and two rules are applied before rendering. The
visibility rule skips a threshold if its value falls outside the min/max
range of its associated series specifically, not just the global graph
range. The color inheritance rule automatically applies the associated
series' color to the threshold line when no explicit color is set, creating
a natural visual association between a threshold and its series. Both rules
default gracefully —series_indexdefaults to0and an explicit color
always takes priority over the inherited series color. -
Updated
examples/threshold.rsto demonstrate both single-series and
multi-series threshold usage, including the visibility rule and color
inheritance rule. -
Refactored
options.rsinto a module directory (src/options/) with three
focused files, mirroring the structure used bysrc/asciigraph/:charset.rs—CharSet,DEFAULT_CHAR_SET, andcreate_char_setconfig.rs—Configstruct and all its builder methodsextensions.rs—ZeroLine,Threshold, andStatAnnotations
No public API changes — all types remain accessible at the same paths as before.