WPF 交互式数据显示

Interactive Data Display for WPF是一组控件,用于在您的应用程序中添加动态数据的交互式可视化。「Interactive Data Display for WPF is a set of controls for adding interactive visualization of dynamic data to your application. 」

Github stars Tracking Chart

WPF 交互式数据显示

Interactive Data Display for WPF 是一组控件,用于在您的应用程序中添加动态数据的交互式可视化。它允许创建线图、气泡图、热图和其他复杂的二维图,这在科学软件中非常常见。交互式数据显示 WPF 与 Bing Maps 控件很好的集成,以经纬度坐标在地理地图上显示数据。这些控件也可以通过编程来操作。

如何安装

可以 从 NuGet 安装 WPF 的 IDD。

PM > Install-Package InteractiveDataDisplay.WPF -Version 1.0.0

如何使用 WPF 的 IDD

用交互式数据显示画图很简单

一行 C# 代码就可以绘制简单的线图

linegraph.Plot(x,y);  // x 和 y 是 IEnumerable<double>

以及相应的XAML片段

<d3:Chart BottomTitle="Argument" LeftTitle="Function">
     <d3:LineGraph x:Name="linegraph" Description="Simple linegraph" Stroke="Blue" StrokeThickness="3"/>
</d3:Chart>

如果我们得到数组 x 和 y 为:

var x = Enumerable.Range(0, 1001).Select(i => i / 10.0).ToArray();
var y = x.Select(v => Math.Abs(v) < 1e-10 ? 1 : Math.Sin(v) / v).ToArray();

我们会收到:

其他交互式数据显示样本:

(恕删略。请参见自述文件)

请看这里的源代码。

许可证

WPF 交互式数据显示是在 MIT 授权下进行的。

其他

还有 Javascript 的 交互式数据显示。你可以在这里看到交互式样本。

贡献

这个项目欢迎贡献和建议。大多数贡献需要您同意贡献者许可协议(CLA),声明您有权利,并且确实授予我们使用您的贡献的权利。详情请访问 https://cla.microsoft.com

当你提交一个拉取请求时,CLA 机器人会自动判断你是否需要提供 CLA,并对 PR 进行适当的装饰(例如,标签、评论)。只需按照机器人提供的说明进行操作即可。您只需要在所有使用我们 CLA 的仓库中做一次。

这个项目已经采用了微软开源行为准则。有关更多信息,请参见行为准则常见问题,或联系 opencode@microsoft.com 了解其他问题或意见。


Main metrics

Overview
Name With Ownermicrosoft/InteractiveDataDisplay.WPF
Primary LanguageC#
Program languageC# (Language Count: 1)
PlatformWindows
License:Other
所有者活动
Created At2017-09-13 08:02:24
Pushed At2024-03-17 07:13:32
Last Commit At2023-06-12 20:27:15
Release Count0
用户参与
Stargazers Count1k
Watchers Count64
Fork Count268
Commits Count21
Has Issues Enabled
Issues Count37
Issue Open Count31
Pull Requests Count8
Pull Requests Open Count4
Pull Requests Close Count2
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Interactive Data Display for WPF

Interactive Data Display for WPF is a set of controls for adding interactive visualization of dynamic data to your application. It allows to create line graphs, bubble charts, heat maps and other complex 2D plots which are very common in scientific software. Interactive Data Display for WPF integrates well with Bing Maps control to show data on a geographic map in latitude/longitude coordinates. The controls can also be operated programmatically.

How to install

The IDD for WPF can be installed from NuGet:

PM > Install-Package InteractiveDataDisplay.WPF -Version 1.0.0

How to use

Drawing with Interactive Data Display is easy.

One line of C# code to draw simple linegraph:

linegraph.Plot(x,y); // x and y are IEnumerable<double>

And corresponding XAML snippet:

<d3:Chart BottomTitle="Argument" LeftTitle="Function">
     <d3:LineGraph x:Name="linegraph" Description="Simple linegraph" Stroke="Blue" StrokeThickness="3"/>
</d3:Chart> 

If we get arrays x and y as:

var x = Enumerable.Range(0, 1001).Select(i => i / 10.0).ToArray();
var y = x.Select(v => Math.Abs(v) < 1e-10 ? 1 : Math.Sin(v) / v).ToArray();

We will receive:

Other Interactive Data Display samples:

See the source code here.

Licensing

Interactive Data Display for WPF is under the MIT license.

Other

There is also Interactive Data Display for Javascript. You can see interactive samples here.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or
contact opencode@microsoft.com with any additional questions or comments.