Bubble Chart

A bubble chart extends the scatter chart by mapping a third data dimension to point radius. Larger values render as bigger circles, making it easy to compare three variables at once.

Basic Usage

<ArcadiaBubbleChart TItem="Company" Data="@companies"
                  XField="@(d => d.Revenue)"
                  YField="@(d => d.Growth)"
                  SizeField="@(d => d.Employees)"
                  Height="400" Width="0" Color="primary"
                  Title="Revenue vs Growth (bubble = employees)" />

@code {
    record Company(double Revenue, double Growth, double Employees);

    List<Company> companies = new()
    {
        new(120, 15, 500), new(80, 25, 200),
        new(200, 8, 1200), new(50, 30, 100),
    };
}

With Trendline

<ArcadiaBubbleChart TItem="Company" Data="@companies"
                  XField="@(d => d.Revenue)"
                  YField="@(d => d.Growth)"
                  SizeField="@(d => d.Employees)"
                  Trendline="@(new TrendlineConfig { Type = TrendlineType.Linear })" />

Parameters

ArcadiaBubbleChart inherits from ArcadiaScatterChart and shares all its parameters. The key differentiator is the SizeField parameter.

ParameterTypeDefaultDescription
XFieldFunc<T, double>requiredX value selector
YFieldFunc<T, double>requiredY value selector
SizeFieldFunc<T, double>?nullBubble size selector (required for bubble effect)
PointSizedouble5Minimum point radius
PointOpacitydouble0.7Opacity of bubbles (0.0 to 1.0)
Colorstring?nullBubble color
TrendlineTrendlineConfig?nullTrendline config
TrendlineOpacitydouble0.6Opacity of the trendline

Plus all shared ChartBase parameters.

Events

EventTypeDescription
OnPointClickEventCallback<PointClickEventArgs<T>>Fired when a bubble is clicked

Accessibility

  • SVG has role="figure" and aria-label
  • Hidden <table> with X, Y, and Size columns for screen readers
  • Animations respect prefers-reduced-motion

Use Cases

  • Market analysis — plot revenue vs growth with company size as bubble radius
  • Portfolio visualization — risk vs return with investment size
  • Geographic data — population density comparisons