Syncfusion.AspNetCore.Sparkline
34.1.31
Prefix Reserved
dotnet add package Syncfusion.AspNetCore.Sparkline --version 34.1.31
NuGet\Install-Package Syncfusion.AspNetCore.Sparkline -Version 34.1.31
<PackageReference Include="Syncfusion.AspNetCore.Sparkline" Version="34.1.31" />
<PackageVersion Include="Syncfusion.AspNetCore.Sparkline" Version="34.1.31" />
<PackageReference Include="Syncfusion.AspNetCore.Sparkline" />
paket add Syncfusion.AspNetCore.Sparkline --version 34.1.31
#r "nuget: Syncfusion.AspNetCore.Sparkline, 34.1.31"
#:package Syncfusion.AspNetCore.Sparkline@34.1.31
#addin nuget:?package=Syncfusion.AspNetCore.Sparkline&version=34.1.31
#tool nuget:?package=Syncfusion.AspNetCore.Sparkline&version=34.1.31
Syncfusion® ASP.NET Core Sparkline Charts
The Syncfusion® ASP.NET Core Sparkline Charts component renders compact, word-sized charts that are ideal for embedding data visualizations within tables, dashboards, and inline text.
Key Features
- Supports Line, Column, Area, WinLoss, and Pie sparkline types
- High, Low, Start, End, and Negative point markers with custom colors
- Tooltip for point-level data display
- Data labels for annotating values
- Range band support to highlight a target range
- Lightweight and ideal for grid cells and summary rows
Common Setup
All Syncfusion ASP.NET Core controls share the same foundational setup steps:
1. Install NuGet Package
Install-Package Syncfusion.AspNetCore.Charts
2. Register Tag Helper
Add the following to ~/Pages/_ViewImports.cshtml or ~/Views/_ViewImports.cshtml:
@addTagHelper *, Syncfusion.AspNetCore.Charts
3. Add Stylesheet & Script References
In your layout file (~/Pages/Shared/_Layout.cshtml):
<head>
<link rel="stylesheet" href="_content/Syncfusion.AspNetCore.Themes/styles/fluent2.css" />
<script src="_content/Syncfusion.AspNetCore.Sparkline/scripts/sf-sparkline.min.js"></script>
</head>
4. Register Script Manager
In your layout file (~/Pages/Shared/_Layout.cshtml), At the end of your <body> tag:
<ejs-scripts></ejs-scripts>
Quick Start
Step 1: ~/Pages/Index.cshtml.cs
public class IndexModel : PageModel
{
public List<SparklineData> SparklineDataList { get; set; }
public void OnGet()
{
SparklineDataList = new List<SparklineData>
{
new SparklineData { X = 1, Y = 2 },
new SparklineData { X = 2, Y = 6 },
new SparklineData { X = 3, Y = 8 },
new SparklineData { X = 4, Y = 5 },
new SparklineData { X = 5, Y = 10 }
};
}
}
public class SparklineData
{
public int X { get; set; }
public double Y { get; set; }
}
Step 2: ~/Pages/Index.cshtml
<ejs-sparkline id="container" type="Line" dataSource="@Model.SparklineDataList" xName="X" yName="Y">
</ejs-sparkline>
Step 3: Run the Application
Press Ctrl+F5 to run the application in your browser.
Documentation
Support
License
This is a commercial product and requires a paid license for possession or use. Review the Syncfusion® EULA
About Syncfusion®
Syncfusion® provides 1600+ UI components and frameworks for web, mobile, and desktop development across multiple platforms:
Web: Blazor | ASP.NET Core | ASP.NET MVC | JavaScript | Angular | React | Vue
Desktop: WinForms | WPF | WinUI
Learn more at www.syncfusion.com
sales@syncfusion.com | Toll Free: 1-888-9-DOTNET
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
- Syncfusion.AspNetCore.Base (>= 34.1.31)
- Syncfusion.AspNetCore.Charts (>= 34.1.31)
- Syncfusion.Licensing (>= 34.1.31)
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
- Syncfusion.AspNetCore.Base (>= 34.1.31)
- Syncfusion.AspNetCore.Charts (>= 34.1.31)
- Syncfusion.Licensing (>= 34.1.31)
-
net9.0
- Newtonsoft.Json (>= 13.0.4)
- Syncfusion.AspNetCore.Base (>= 34.1.31)
- Syncfusion.AspNetCore.Charts (>= 34.1.31)
- Syncfusion.Licensing (>= 34.1.31)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.