insightdock::charts::CartesianOptions::custom_y_formatter

Custom y-axis tick formatter.

Synopsis

Declared in <insightdock/cartesian_chart.h>
std::function<std::string(double)> custom_y_formatter;

Description

When non-null, overrides y_tick_format. The callback receives the tick value and returns the label string.

opts.custom_y_formatter = [](double v) { char buf[32]; std::snprintf(buf, sizeof(buf), "%.1f kbps", v / 1000.0); return std::string(buf); };

Created with MrDocs