LooseChart 1.0.11
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package LooseChart --version 1.0.11
NuGet\Install-Package LooseChart -Version 1.0.11
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.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LooseChart --version 1.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LooseChart, 1.0.11"
#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.
// Install LooseChart as a Cake Addin #addin nuget:?package=LooseChart&version=1.0.11 // Install LooseChart as a Cake Tool #tool nuget:?package=LooseChart&version=1.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
开源不易,感谢支持
如需定制,请联系:Lvwl@outlook.com
LooseChart 松散图表控件 Gitee、NuGet
<b>数据量500万,单图1秒以内完成显示。(电脑配置不同,性能有所差异)</b>
支持.NET6、.NET5、.NETCore3.1、.NETFramework 4.6.2及以上的WPF
支持Line、Log、Duration轴
支持散点图、密度图、伪彩图、等高线图、折线图
支持鼠标滚轮控制轴放大缩小,鼠标左键平移操作
Axis
IAxis 轴抽象基类
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
AxisType | 轴类型 | AxisType | X、Y、Y2 |
Foreground | 显示的前景色 | Brush | |
Background | 显示的被景色 | Brush | |
FontSize | 显示的数字大小 | double | |
PowerFontSize | 显示的指数数字大小 | double | |
Range | 坐标最大值最小值 | AxisRange | |
GetValueAxisConvertParam() | 实际值和坐标值转换时使用的参数 | ValueAxisConvertParamBase | |
ValueToAxisValue(double)、ValueToAxisValue(double,ValueAxisConvertParamBase) | 实际值转坐标值方法 | double | |
AxisValueToValue(double)、AxisValueToValue(double,ValueAxisConvertParamBase) | 坐标值转实际值方法 | double | |
GetConvertParam() | 获取实际值、坐标值、位置值转换参数 | ValueLocationConvertParam | |
GetValueLocation(double)、GetValueLocation(double,ValueLocationConvertParam) | 实际值转位置值 | double | |
GetAxisValueLocation(double)、GetAxisValueLocation(double,ValueLocationConvertParam) | 坐标值转位置值 | double | |
GetLocationAxisValue(double)、GetLocationAxisValue(double,ValueLocationConvertParam) | 位置值转坐标值 | double | |
GetLocationValue(double)、GetLocationValue(double,ValueLocationConvertParam) | 位置值转实际值 | double | |
Draw() | 重新绘制轴 | void | |
RedrawAll() | 重新绘制所有,包括轴、图 | void | 轴的关键参数发生变化影响图表显示时使用 |
AxisType 枚举,轴类型
属性 | 含义 | 说明 |
---|---|---|
X | X轴 | |
Y | Y轴 | |
Y2 | Y2轴 | 右侧Y轴 |
AxisRange 结构体,轴距范围
属性 | 类型 | 说明 |
---|---|---|
Max | double | 最大值 |
Min | double | 最小值 |
ValueLocationConvertParam 轴转换参数,实际值、坐标值、位置值相互转换时使用
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
MaxAxisValue | 最大坐标值 | double | |
MinAxisValue | 最小坐标值 | double | |
Length | 图长度 | double | X轴取控件的宽度,Y轴取控件的长度 |
AxisType | 轴类型 | AxisType | |
ValueAxisParam | 实际值和坐标值转换参数 | ValueAxisConvertParamBase |
LinearAxis 线性轴,继承自IAxis
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
Power | 10的次方数 | int | 只读 |
DurationAxis 时间段中,以秒为单位,继承自IAxis
属性 | 含义 | 类型 | 说明 |
---|
NegativeLogAxis 可负数指数轴,继承自IAxis
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
LogBase | log的底 | double | 正整数或常数e、π |
LinePowerCount | 线性显示的次方数,0附近 | uint | -Math.Pow(LogBase,LinePowerCount)~Math.Pow(LogBase,LinePowerCount)之间用线性显示 |
LineCompress | 线性部分压缩倍数 | double | 非0正数,默认1 |
NegativeLogValueAxisConvertParam 实际值和坐标值转换参数
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
LogBase | log的底 | double | |
LinePowerCount | 线性显示的次方数,0附近 | uint | |
LineCompress | 线性部分压缩倍数 | double |
Series 显示的图
ISeries 图的抽象基类
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
XAxis | x轴 | IAxis | 不能为空,否则无法绘制图形 |
YAxis | y轴 | IAxis | 不能为空,否则无法绘制图形 |
XSource | x轴数据 | IList | |
YSource | y轴数据 | IList | |
XSourceConverter | x轴数据转double方法 | Func< object, double > | |
YSourceConverter | y轴数据转double方法 | Func< object, double > | |
MaxDegreeOfParallelism | 运行使用的最大线程数 | int | 默认4 |
IsDrawing | 是否正在绘制中 | bool | 只读 |
CancelDrawing() | 取消绘制 | void | 停止所有绘制线程 |
ShowFill | 是否显示填充 | bool | 默认true |
ShowStroke | 是否显示边框 | bool | 默认true |
StrokeThickness | 边框粗细 | int | 默认1 |
FillColorA | 填充色不透明度 | byte | 默认0xff |
StrokeColorA | 边框不透明度 | byte | 默认0xff |
DisplayColor | 显示的颜色 | Color | 默认随机生成 |
DashStyle | 线条样式 | DashStyle | 默认Solid |
RandomColor(byte) | 随机生成颜色的静态方法 | Color | |
GetGradientColor(long,long,Color) | 生成渐变色的静态方法 | Color | 第一个参数为当前层级数,第二个参数为总层级数,第三个参数为基准颜色值 |
ExcessDisplayAtEdge | 超出边界是否压边显示 | bool | 默认false |
Redraw() | 重新刷新图形 | void | 可以手动刷新一次图形显示 |
XYSeries 二维图的抽象基类,基础值ISeries
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
PointLength | 点宽度 | int | 默认2 |
DensitySeries 密度图,继承自XYSeries
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
MinOpacity | 最小不透明度 | byte | 默认0x10 |
PseudoColorSeries 伪彩图,继承自XYSeries
属性 | 含义 | 类型 | 说明 |
---|
ScatterSeries 散点图,继承自XYSeries
属性 | 含义 | 类型 | 说明 |
---|
LineSeries 折线图,继承自XYSeries
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
ShowPoint | 是否显示折点 | bool | 默认true |
ContourSeries 等高线图,继承自XYSeries
属性 | 含义 | 类型 | 说明 |
---|---|---|---|
GradeBase | 等高线分级基数 | int | 默认3 |
GradeType | 分级方式 | GradeType | 默认GradeType.Log |
GradeType 枚举,分级方式
属性 | 含义 | 说明 |
---|---|---|
Line | 线性分级 | |
Log | 对数分级 |
示例
前端
<Grid ClipToBounds="True">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<chart:NegativeLogAxis x:Name="yaxis" AxisType="Y" />
<chart:NegativeLogAxis
x:Name="xaxis"
Grid.Row="1"
Grid.Column="1"
AxisType="X" />
<chart:PseudoColorSeries
x:Name="series"
Grid.Column="1"
XAxis="{Binding ElementName=xaxis}"
YAxis="{Binding ElementName=yaxis}" />
</Grid>
后端
使用到FCS库
var fcs = FCS.Factory.ReadFileOneDataset("Sample_003.fcs");
this.series.DisplayColor = LooseChart.ISeries.RandomColor();
this.series.XSource = fcs.Measurements[12].ChannelValues;
this.series.YSource = fcs.Measurements[15].ChannelValues;
更新说明
1.0.11
1、折线图线连接处为角
2、修复轴bug
1.0.9
1、优化轴显示效果
1.0.8
1、折线图不去重
1.0.7
1、优化时长轴显示效果
1.0.6
1、优化去重算法
1.0.5
1、优化折线图
1.0.4
1、优化所有图显示速度
1.0.3
1、优化折线图
2、添加DashStyle属性,支持虚线功能
1.0.1
1、优化折线图
2、轴大小改变时自动刷新图表显示
1.0.0
1、新规作成
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
net6.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.