insightdock::charts::LineChart

Multi-series line chart.

Synopsis

Declared in <insightdock/line_chart.h>
class LineChart
    : public CartesianChart

Base Classes

Name Description
CartesianChartAbstract base for charts with x/y axes, categories, and multiple series.

Types

Name Description
PlotContext Context passed to draw_series() and draw_overlay() during rendering.

Member Functions

Name Description
add_series add_series overloads
apply_theme Apply a ChartTheme to this chart's color and typography options.
cartesian_options Mutable Cartesian options.
categories Category labels.
clear_series Remove all series (categories unchanged).
clone [virtual]
draw [virtual]Draw the whole chart into target (raster, SVG or PDF). Returns true.
line_options Mutable line drawing options.
options options overloads
render [virtual]Render axes, grid, legend, and series to RGBA.
series All data series.
set_categories Set category labels (x-axis).
set_x_values Set per-point numeric x-values (e.g. Unix timestamps) for continuous x-axis positioning, in place of evenly-spaced categories.
vector_capability [virtual]
x_values Numeric x-values set via set_x_values, if any.

Protected Member Functions

Name Description
compute_plot_rect Compute plot rectangle inside the image buffer.
compute_y2_max [virtual]Maximum value for the secondary y-axis domain.
compute_y2_min [virtual]Minimum value for the secondary y-axis domain.
compute_y_max [virtual]Maximum y value for scale (default: data max with padding).
compute_y_min [virtual]Minimum y value for scale (default: 0 or data min).
draw_axes_and_grid
draw_background
draw_legend
draw_overlay [virtual]
draw_series [virtual]
draw_title
has_secondary_y_axis [virtual]Whether to render a secondary (right-side) y-axis. Default: false.
is_horizontal [virtual]Whether to lay out the plot with a horizontal value axis (bottom) and a vertical category axis (left), instead of the default vertical value axis (left) / horizontal category axis (bottom). Default: false. Overridden by BarChart based on BarOptions::orientation; not meaningful for Line/Area/Combo's point-based geometry, so they don't override it. ReferenceLine / ReferenceBand overlays are not supported in horizontal mode (v1) since their orientation semantics assume a vertical value axis.
supports_continuous_x_axis [virtual]
x_label_row_height Height of the x-axis label row (one line, or the longest label when rotated).
x_labels_rotated True when x-axis labels are drawn rotated 90° (grows the bottom margin).
y_axis_is_percent [virtual]True when the primary value axis is a 0-100 share (100%-stacked charts); labels get %.
y_tick_label Primary value-axis tick label (honours y_axis_is_percent and the formatters).

Protected Data Members

Name
cartesian_
categories_
options_
series_
x_values_

Non-Member Functions

Name Description
detail::build_chart_svgRender chart as a native-vector SVG document.

Description

LineChart line; line.set_categories({"Jan", "Feb", "Mar"}); line.add_series("Sales", {10, 20, 15}); line.line_options().fill_area = true; ChartExporter::save(line, "line.png");

Created with MrDocs