Context passed to draw_series() and draw_overlay() during rendering.
<insightdock/cartesian_chart.h>
struct PlotContext;
| Name | Description |
|---|---|
cart_opts | Axis options. |
categories | |
continuous_x | Whether x_scale maps a continuous numeric domain (from x_values) rather than category index — true only when the concrete chart type opted in via CartesianChart::supports_continuous_x_axis and CartesianOptions::x_scale_type is ScaleType::DateTime with non-empty x_values. See set_x_values. |
font | Font for labels. |
has_y2 | Whether y_scale2 is active for this render. |
horizontal | Whether the plot is laid out with a horizontal value axis (bottom) and a vertical category axis (left) instead of the default vertical value axis (left) / horizontal category axis (bottom). Only BarChart opts in via CartesianChart::is_horizontal. When true, y_scale's pixel range spans the plot's horizontal extent (left→right) rather than vertical — it still represents the "value" axis, just rotated. |
opts | Common chart options. |
plot | Plot area rectangle (excluding margins). |
series | |
target | Drawing surface (raster, SVG or PDF). |
x_scale | Category index, or continuous value, → pixel. |
x_values | Populated only when continuous_x is true. |
y_scale | Data value → pixel (primary, left axis). |
y_scale2 | Data value → pixel (secondary, right axis). |
| Name | Description |
|---|---|
::insightdock::charts::detail::draw_reference_lines | Draws CartesianOptions::reference_bands then CartesianOptions::reference_lines. |
Public (not protected) so shared overlay helpers outside the class hierarchy — e.g. the reference-line/band renderer used by Bar/Line/Area/Combo — can take a PlotContext const& parameter.