11-27-2012 10:59 AM
Hello,
I'm looking for examples of error bar included in WPF graph control.
thanks
Solved! Go to Solution.
11-28-2012 07:08 AM - edited 11-28-2012 07:14 AM
Hi Gaspard,
What kind of data are you manipulating ?
Regards,
Antonin G. Associated LabVIEW Developper
National Instruments France
11-28-2012 09:41 AM
Hi again,
you will find on the link below an example of error bar graph in Measurement Studio:
http://zone.ni.com/devzone/cda/epd/p/id/430
This example program creates error bars on a Measurement Studio .NET graph using extensibility.
Hope it will help 😉
Regards,
Antonin G. Associated LabVIEW Developper
National Instruments France
11-28-2012 11:32 AM
Hi,
Thank you for your response.
I use regularly error bar for NI ScatterGraph ctrl in Windows form and the class ErrorBarPlot (like in your example). With WPF form, the Ni graph control does not show error bar facilities like scatterGraph . Do you know a possibility to add error bar on WPF graph or WritableGraph? I have perhaps missed a part of Graph control and the associated xaml option.
regards
11-28-2012 01:48 PM
You haven’t missed anything: error bars are one of the features from Windows Forms that we did not have time to implement for the first version of the WPF graph controls.
Attached is a quick demonstration of a custom error bar renderer for the WPF graph. From XAML, you can use it in a plot like so:
<ni:Graph Name="graph">
<ni:Graph.Plots>
<ni:Plot>
<ni:PlotRendererGroup>
<my:ErrorBarRenderer />
<ni:LinePlotRenderer Stroke="Green" />
</ni:PlotRendererGroup>
</ni:Plot>
</ni:Graph.Plots>
</ni:Graph>
The example uses hard-coded values, but you should be able to adapt the code to fit your situation.
11-29-2012 04:35 AM
Thanks Phansen
This is a good starting code to study error bar in WPF graph control.