TerraFluent.Chart.Reporting

Scatter Plot in C#

Create scatter plots in C# with AddScatter — marker shapes, borders, and regression overlays. Self-contained SVG from .NET, no JavaScript required.

Scatter Chart

ChartType.Scatter — dots only, no connecting line.

Height vs Weight Correlation — ChartType.Scatter — dots only, no connecting line Height vs Weight Correlation — ChartType.Scatter — dots only, no connecting line — Series: Group A, Group B. Values range from 43 to 80. Height vs Weight Correlation ChartType.Scatter — dots only, no connecting line 0 20 40 60 80 Value Index Group A: 62 Group A: 58 Group A: 74 Group A: 55 Group A: 80 Group A: 67 Group A: 71 Group A: 59 Group A: 77 Group A: 63 Group B: 45 Group B: 52 Group B: 61 Group B: 48 Group B: 57 Group B: 70 Group B: 43 Group B: 65 Group B: 53 Group B: 68 Group A Group B terrafluent.dev terrafluent.dev

When to use a scatter plot

Reach for it when

  • Looking for correlation, clusters, or outliers between two measures.
  • Distributions with many points, where individual markers show density that a line would hide.
  • Paired with AddLinearRegression when you want to state the trend as well as show it.

Use something else when

  • Few points. With six markers there is no distribution to see; a table or column chart says more.
  • Heavy overplotting without reduced opacity or smaller markers — a solid blob encodes nothing.
  • A third dimension crammed in by colour alone; use a bubble chart and encode it as size.

Scatter Plot in C#

Lifted verbatim from the chart types reference, so it compiles against the shipped API. See the API reference for every overload and the exact data types each series method accepts.

string svg = ChartBuilder.Create()
    .Title("Sales Rep Performance")
    .Size(700, 420)
    .XAxis(x => x.Title = "Calls Made")
    .YAxis(y => { y.Title = "Deals Closed"; y.Min = 0; })
    .AsAnimated()
    .Series(s => s
        .AddScatter("Team A", new double[] { 62, 58, 74, 55, 80, 67, 71 },
            cfg => cfg.Color(ChartColor.ChartBlue).MarkerSize(8))
        .AddScatter("Team B", new double[] { 45, 52, 61, 48, 57, 70, 43 },
            cfg => cfg.Color(ChartColor.ChartOrange).MarkerSize(8)))
    .RenderToSvg();

Install

dotnet add package TerraFluent.Chart.Reporting
  • MIT licensed — free for commercial use, no chart limits, no watermarks.
  • Zero dependencies — nothing but the .NET base class library.
  • netstandard2.0 through net10.0 — .NET Framework 4.6.1+, .NET Core 2.0+, and every modern release.
  • Output is one SVG string — embed it in HTML, a PDF, or a Word document.