LooseChart 1.0.16

dotnet add package LooseChart --version 1.0.16
                    
NuGet\Install-Package LooseChart -Version 1.0.16
                    
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="LooseChart" Version="1.0.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LooseChart" Version="1.0.16" />
                    
Directory.Packages.props
<PackageReference Include="LooseChart" />
                    
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 LooseChart --version 1.0.16
                    
#r "nuget: LooseChart, 1.0.16"
                    
#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 LooseChart@1.0.16
                    
#: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=LooseChart&version=1.0.16
                    
Install as a Cake Addin
#tool nuget:?package=LooseChart&version=1.0.16
                    
Install as a Cake Tool

开源不易,感谢支持,承接医疗设备上位机软件开发

支付宝微信


LooseChart 松散图表控件

NuGet License

LooseChart 是一款基于 WPF 的高性能图表控件库,专为海量数据可视化场景设计。支持 500 万级数据点秒级渲染,提供多种图表类型和坐标轴,同时内置丰富的鼠标与触摸交互操作。

✨ 核心特性

  • ⚡ 高性能渲染:500 万数据点单图 1 秒内完成显示 (配置不同性能有所差异)
  • 📊 多种图表类型:散点图、折线图、密度图、伪彩图、等高线图、柱状图、条形图、直方图、饼图
  • 📏 多种坐标轴:线性轴 (Linear)、对数轴 (NegativeLog)、双指数轴 (LogicleLog)、时间轴 (DateTime)、时长轴 (Duration)、字符串轴 (StringAxis)
  • 🖱️ 丰富交互:鼠标滚轮缩放、左键拖动平移、触摸屏手势支持、可独立开关缩放/平移
  • 🔄 异步绘制:后台线程计算 + UI 线程渲染,支持 CancellationToken 取消
  • 🏗️ 灵活架构:多 Series 可共享同一对坐标轴,支持动态创建控件
  • 🎨 可定制外观:填充色、边框、透明度、虚线样式、压边显示、HSB 渐变配色
  • 🔧 交互可控:IsZoomEnabled / IsPanEnabled 属性独立控制缩放和平移行为

📦 支持框架

框架 版本
.NET net6.0-windows / net8.0-windows / net10.0-windows
.NET Framework net472/net48

🚀 快速开始

1. 安装 NuGet 包

dotnet add package LooseChart

或通过 NuGet 包管理器搜索 LooseChart 安装。

2. XAML 中使用图表

支持多种图表类型和轴类型:

<Window x:Class="Demo.MainWindow"
        xmlns:chart="clr-namespace:LooseChart;assembly=LooseChart">
    <Grid>
        
        <chart:LinearAxis x:Name="yaxis" AxisType="YLeft" />
        <chart:LinearAxis x:Name="xaxis" AxisType="XBottom" Grid.Row="1" Grid.Column="1" />

        
        <chart:ScatterSeries x:Name="series" Grid.Column="1"
                             XAxis="{Binding ElementName=xaxis}"
                             YAxis="{Binding ElementName=yaxis}" />
    </Grid>
</Window>

也可使用其他图表类型和轴:

图表类型 说明 绑定轴
ScatterSeries 散点图 XAxis + YAxis (NumberBaseAxis)
LineSeries 折线图 XAxis + YAxis (NumberBaseAxis)
DensitySeries 密度图 XAxis + YAxis (NumberBaseAxis)
PseudoColorSeries 伪彩图 XAxis + YAxis (NumberBaseAxis)
ContourSeries 等高线图 XAxis + YAxis (NumberBaseAxis)
HistogramSeries 直方图 XAxis + YAxis (NumberBaseAxis)
BarSeries 柱状图 YAxis (NumberBaseAxis)
HorizontalBarSeries 水平条形图 XAxis (NumberBaseAxis)
ArrayLineSeries 一维折线图 YAxis (NumberBaseAxis)
PieSeries 饼图/环形图 无需绑定轴

3. 后端设置数据

var xData = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0 };
var yData = new double[] { 10.0, 20.0, 15.0, 30.0, 25.0 };

this.series.Count = xData.Length;
this.series.XSourceConverter = (i) => xData[i];
this.series.YSourceConverter = (i) => yData[i];
this.series.DisplayColor = LooseChart.Utility.RandomColor();

📷 效果预览

散点图 密度图 伪彩图 等高线图 折线图 直方图 柱状图和折线图 条形图 饼图

🔗 相关链接

链接 说明
Gitee 开源地址 国内镜像
更新日志 版本更新记录
SDK 文档 完整 API 文档与使用指南
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net10.0-windows7.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.16 143 6/30/2026