BPT

Trendline Chart

BptChartTrendline

Trendline chart — fits a regression model through a cloud of (X, Y) points and renders the resulting line, optional 95% confidence band, optional R² annotation, and the underlying data dots. Switch the dataset and noise level to see how the fit quality changes. Built on the BPT chart foundation — palette-aware, scroll-zoom, and keyboard-accessible via a hidden data table.

Trendline Chart Parameters
Current Configuration
📋
<BptChartTrendline Data="@Data"
                   Width="680"
                   Height="400"
                   XAxisLabel="Hours studied"
                   YAxisLabel="Exam score"
                   Title="Study hours vs exam score"
                   OnElementClick="HandleClick" />

@code {
private readonly IReadOnlyList<BptChartTrendlinePoint> Data = new BptChartTrendlinePoint[]
{
    new(X:  0, Y: 35.2), new(X:  4, Y: 41.7), new(X:  8, Y: 46.3),
    new(X: 12, Y: 50.1), new(X: 16, Y: 55.6), new(X: 20, Y: 60.4),
    // …more samples
};

private void HandleClick(BptChartElementEvent e) {
    // Click handler — fires regardless of TooltipMode.
}
}
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.