DynamicDataDisplay曲线图控件的使用
官网
因为已停止维护,目前没有官方网站。
安装
目前的最新版本是0.3.0.1
Install-Package DynamicDataDisplay
前台代码
<Window x:Class="DynamicDataDisplayDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0" xmlns:local="clr-namespace:DynamicDataDisplayDemo" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Title="MainWindow" Width="800" Height="450" mc:Ignorable="d"> <Grid> <d3:ChartPlotter Name="plotter" /> </Grid> </Window>
后台代码
using Microsoft.Research.DynamicDataDisplay; using Microsoft.Research.DynamicDataDisplay.DataSources; using System.Windows; using System.Windows.Media; namespace DynamicDataDisplayDemo { public partial class MainWindow : Window { private ObservableDataSource<Point> currentDataFrame = new ObservableDataSource<Point>(); public MainWindow() { InitializeComponent(); LoadChartPlotter(); } private void LoadChartPlotter() { LineGraph graphAcc_x = new LineGraph(); //注册绘图图线,配置粗细颜色以及显示名称 graphAcc_x = plotter.AddLineGraph(currentDataFrame, Colors.Red, 1, "AD_data"); plotter.FitToView(); ShowLine(); } private void ShowLine() { Point point = new Point(0, 0); for (int i = 1; i <= 512; i++) { point.X = i; point.Y = i + 100; currentDataFrame.AppendAsync(base.Dispatcher, point); } } } }
运行效果
参考资料
WPF编程,曲线控件DynamicDataDisplay的使用方法(一)_子不语的博客-CSDN博客
https://blog.csdn.net/qq_43307934/article/details/108062270
WPF编程,曲线控件DynamicDataDisplay的使用方法(二)_子不语的博客-CSDN博客
https://blog.csdn.net/qq_43307934/article/details/108062921
WPF编程,曲线控件DynamicDataDisplay的使用方法(三)_子不语的博客-CSDN博客_wpf拖动曲线
https://blog.csdn.net/qq_43307934/article/details/108068952
WPF编程,曲线控件DynamicDataDisplay的使用方法(四)_子不语的博客-CSDN博客
https://blog.csdn.net/qq_43307934/article/details/108200755
WPF编程,曲线控件DynamicDataDisplay的使用方法(五)_子不语的博客-CSDN博客
https://blog.csdn.net/qq_43307934/article/details/108201376
WPF编程,曲线控件DynamicDataDisplay的使用方法(六)_子不语的博客-CSDN博客_dynamicdatadisplay
https://blog.csdn.net/qq_43307934/article/details/108108163
WPF编程,曲线控件DynamicDataDisplay的简单案例_苏守坤的博客-CSDN博客_dynamicdatadisplay
https://blog.csdn.net/u014453443/article/details/112478745
WPF编程,曲线控件DynamicDataDisplay的源码分析_苏守坤的博客-CSDN博客
https://blog.csdn.net/u014453443/article/details/112476884
WPF中DynamicDataDisplay的使用总结 - 低音弦 - 博客园
https://www.cnblogs.com/shzt/p/9150984.html