11-27-2012 10:25 AM
11-27-2012 10:58 AM
Hello there,
There are two solutions for your problem:
Solution1: Allow the graph to calculate ticks
This ensures that there are 10 ticks, hence 10 gridlines.
Solution2: Calculate ticks manually!
This solutiosn that there are 10 ticks, hence 10 gridlines and you have higher control over the spacing between the gridlines.
Hope this helps!
Vijet Patankar
National Instruments
12-13-2012 08:47 PM
Will this solution also fix the labels number resolution? Or is there a different way to change the WPF graph's label so it shows more resolution? eg: 99.579
..
12-14-2012 10:14 AM
Hi gs70,
You can specify the LabelPresenter property on the RangeLabeledDivisions instance in your MajorDivisions property of the axis. You can use a GeneralValueFormatter and specify the format string you want (number of digits, etc.).
12-14-2012 12:35 PM
Thanks that did the trick...
I posted the XAML code for reference..
<ni:Graph.Axes> <ni:AxisDouble x:Name="VerticalAxis" Orientation="Vertical" > <ni:AxisDouble.MajorDivisions> <ni:RangeLabeledDivisions> <ni:RangeLabeledDivisions.LabelPresenter> <ni:GeneralValueFormatter Format="0.000" /> </ni:RangeLabeledDivisions.LabelPresenter> </ni:RangeLabeledDivisions> </ni:AxisDouble.MajorDivisions> </ni:AxisDouble> </ni:Graph.Axes>