Overview
Blazor Scatter Chart is used to plot data with two numeric parameters. Also referred as scatter plot/point chart, its rich feature sets include tooltip, multiple axis, zooming and panning, etc.
Multiple series scatter plot
Plot multiple scatter series in a single chart to compare different data sets. Legend and tooltip for the series can make it more readable.
Custom marker
Support different types of symbol to display the data points in scatter plot. This will be useful in differentiating the multiple series and points in same chart.
Data label
Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.
Customization
Customize the look and feel of the Blazor Scatter Chart using built-in APIs.
Blazor Scatter Chart Code Example
Easily get started with Blazor Scatter Chart using a few simple lines of C# code, as demonstrated below. Also explore our Blazor Scatter Chart Example that shows you how to render and configure the chart.
@using Syncfusion.Blazor.Charts
<SfChart DataSource="@MedalDetails">
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category"></ChartPrimaryXAxis>
<ChartSeriesCollection>
<ChartSeries XName="X" YName="YValue" Type="ChartSeriesType.Scatter">
</ChartSeries>
<ChartSeries XName="X" YName="YValue1" Type="ChartSeriesType.Scatter">
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
@code{
public class ChartData
{
public string X { get; set; }
public double YValue { get; set; }
public double YValue1 { get; set; }
}
public List<ChartData> MedalDetails = new List<ChartData>
{
new ChartData { X= "USA", YValue= 46, YValue1=56 },
new ChartData { X= "GBR", YValue= 27, YValue1=17 },
new ChartData { X= "CHN", YValue= 26, YValue1=36 },
new ChartData { X= "UK", YValue= 56, YValue1=16 },
new ChartData { X= "AUS", YValue= 12, YValue1=46 },
new ChartData { X= "IND", YValue= 26, YValue1=16 },
new ChartData { X= "DEN", YValue= 26, YValue1=12 },
new ChartData { X= "MEX", YValue= 34, YValue1=32},
};
}