MatPlotLibNet.AspNetCore 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MatPlotLibNet.AspNetCore --version 0.2.0
                    
NuGet\Install-Package MatPlotLibNet.AspNetCore -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MatPlotLibNet.AspNetCore" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MatPlotLibNet.AspNetCore" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="MatPlotLibNet.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MatPlotLibNet.AspNetCore --version 0.2.0
                    
#r "nuget: MatPlotLibNet.AspNetCore, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MatPlotLibNet.AspNetCore@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MatPlotLibNet.AspNetCore&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=MatPlotLibNet.AspNetCore&version=0.2.0
                    
Install as a Cake Tool

MatPlotLibNet.AspNetCore

ASP.NET Core integration for the MatPlotLibNet charting library. Serves chart JSON specs and SVG output via minimal API endpoints, with optional real-time push via SignalR.

Installation

dotnet add package MatPlotLibNet.AspNetCore

Quick Start

Register services and map endpoints

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddMatPlotLibNetSignalR();

var app = builder.Build();

app.MapChartEndpoint();    // GET /chart?id=... -> JSON
app.MapChartSvgEndpoint(); // GET /chart/svg?id=... -> SVG
app.MapChartHub();         // SignalR hub at /charts-hub

app.Run();

Publish real-time updates

app.MapPost("/update", async (IChartPublisher publisher) =>
{
    var figure = Plt.Create()
        .WithTitle("Live Data")
        .Plot(x, y)
        .Build();

    await publisher.PublishAsync("dashboard-1", figure);
});

API

Type Description
SignalRExtensions.AddMatPlotLibNetSignalR() Registers SignalR services and IChartPublisher
SignalRExtensions.MapChartHub() Maps the ChartHub SignalR endpoint
MatPlotLibNetEndpoints.MapChartEndpoint() Maps a JSON chart endpoint
MatPlotLibNetEndpoints.MapChartSvgEndpoint() Maps an SVG chart endpoint
IChartPublisher Service for broadcasting chart updates
ChartHub SignalR hub with Subscribe/Unsubscribe

License

GPL-3.0 -- Copyright (c) 2026 H.P. Gansevoort

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on MatPlotLibNet.AspNetCore:

Package Downloads
MatPlotLibNet.Interactive

Interactive display for MatPlotLibNet. Show charts in a browser popup with live SignalR updates.

MatPlotLibNet.GraphQL

GraphQL integration for MatPlotLibNet using HotChocolate. Queries and subscriptions for real-time chart updates.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.1 58 4/6/2026
0.4.0 54 4/6/2026
0.2.0 50 4/5/2026