Following the demonstration of the Microsoft .NET Chart control in a previous document (here), I was challenged to create a more user friendly XControl. It's taken some time (we're all busy people) but here's the first draft!
Attached is an XControl that encapsulates a Microsoft .NET Chart. Properties have been created to allow setting of parameters and an Interactive Demo is included to show how easy it is to implement the XControl.
The XControl is at V0.1 and therefore not finished yet, but most of the basic functionality is there. Currently you can:
Set the names and axes labels (the Interactive Demo currently only allows setting the first data series)
Add as many data series as you want (the XControl uses the LabVIEW waveform datatype, which is arrayed)
Change the plot type from Line to Spline to Bar to Area to Donut to Stacked Area 100 etc. etc. etc.
Switch between 2D and 3D plotting (in 3D plotting, you can alter the Inclination, Rotation, Perspective etc.)
Change the colours of the series lines, backgrounds etc.
Change the border style (none, embossed, recessed, framed etc.)
Add a legend, and change (some of) its properties
Zoom and Pan with the mouse (in 2D mode only - a Microsoft limitation)
If you like the XControl, please leave a comment with suggestions on how to improve it.
It is a working progress, and as such cannot be assumed to be stable or reliable, so I wouldn't necessarily recommend you use it for a mission-critical project! But with progress, it could become something very useful indeed
V0.1 Known problems:
Some plot types cannot be mixed (such as Bar and Spline), so if you keep more than one series plotted (such as in the Interactive Demo), the XControl fails if you try to set unpairable plot types
There are some colour options that need tweaking - there are soooo many parameters in the Microsoft Chart control that I got lost, so they're not all accessible yet.
For some unknown reason, the opacity control sometime gets ignored when the plot is redrawn.
Two more snapshots showing radar and polar plot modes (Note: I didn't use the Interactive Demo V0.1 to generate these)