insightdock::charts::ScatterChart

Scatter chart with continuous numeric x and y axes.

Synopsis

Declared in <insightdock/scatter_chart.h>
class ScatterChart
    : public Chart

Base Classes

Name Description
ChartAbstract base for all chart types.

Member Functions

Name Description
add_series add_series overloads
apply_theme Apply a ChartTheme to this chart's color and typography options.
clear_series Remove all series.
clone [virtual]
draw [virtual]Draw axes, legend and scatter/bubble marks into any backend.
options options overloads
render [virtual]Render axes, grid, legend, and markers to RGBA.
scatter_options Mutable scatter options.
series All data series.
vector_capability [virtual]

Protected Data Members

Name
options_

Non-Member Functions

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

Description

Unlike BarChart / LineChart, the x-axis here is not a category list — both axes use linear Scale mapping over the data domain, so x values need not be evenly spaced or sorted. This is why ScatterChart derives directly from Chart rather than CartesianChart.

Set a positive ScatterPoint::radius on any point to enable the bubble variant: that point's marker is scaled between ScatterOptions::min_bubble_radius and ScatterOptions::max_bubble_radius based on its radius value relative to other bubble points. Points left at radius 0 always draw at the fixed ScatterOptions::point_radius.

ScatterChart chart; chart.add_series("Devices", {{1, 20}, {2, 35}, {3, 18}}); ChartExporter::save(chart, "scatter.png");

Created with MrDocs