insightdock::charts::Scale

Maps a data domain [min, max]to a pixel range.

Synopsis

Declared in <insightdock/scale.h>
class Scale;

Member Functions

Name Description
Scale [constructor]Construct a linear scale.
from_pixel Map a pixel coordinate back to data value.
max Current domain maximum.
min Current domain minimum.
nice_ticks Generate human-readable tick values for the current domain.
set_domain Set data domain endpoints.
set_range Set pixel range endpoints.
set_type Set the interpolation mode (default: Linear).
to_pixel Map a data value to pixel coordinate.
type Current interpolation mode.

Static Member Functions

Name Description
linear_nice Build a scale with a "nice" rounded domain and tick set.
log_nice Build a ScaleType::Log scale with a "nice" (power-of-10 / 1-2-5 mantissa) domain and tick set, mirroring linear_nice for logarithmic axes.

Description

ScaleType selects the interpolation mode. linear_nice builds a scale with a rounded ("nice") domain and returns it.

Created with MrDocs