Data Visualization with C#

I am writing some custom components in c#. I have to say that I have been very please at how well my python skills have transferred over. However, one of the things I am struggling with is data visualization.

I would like to create a component that generates and displays various charts, tables, and graphs (along with some svg or png files for logos) in the rhino model space. I would like this to be bake-able geometry, like the charts and graphs that come out of ladybug. However, I’m am begrudingly reazling just how big of a task that is to make something from scratch.

Does anyone know of a library that handles charts and graphs using c# for rhino?

Or does anyone know of an open source project that is displaying graphics in the rhino model space using c#? I have seen Conduit, but from what I can tell, the geometry is not bake-able and is not displayed in the model space, it’s a HUD.

I’m open to other suggestions too.

I’d recommend WPF as a framework.
LiveCharts is an open source visualization library.
There’s also paid visualization libraries for WPF, for example SciChart.

I recommend OxyPlot - free, cross-platform and very versatile.

Note though, that data-analysis and visualization in C# will not be as easy or feature-rich as it is in Python.

@ParamDesSing and @menno Thanks for these suggestions! I’ll look into them.

On the topic of not being as feature rich as python, do you know if there is a way to build a C# plug-in that compiles down to the GHA but also includes some components written in python? This could be a way to leverage the ease of use and features of python for the visuals with a primarily C# plugin.

You can check also Pterodactyl | Food4Rhino as its already using Oxyplot for data visualization with C#, it’s open source so you can also see how it’s done in Github

3 Likes

Yes, it’s possible to connect C# and Python, for example via named pipes.

For Opossum, I’ve built a C# component that calls Python via a (hidden) console, with Python compiled to an *.exe.

In short, it’s possible, but not easy.