Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

wpf Graph :axis position

I want to put  x axis  and  y  axis to the center  of  Graph,like  a  digital scope  screen.

how   can  I  implement  this ?

0 Kudos
Message 1 of 2
(2,117 Views)

One option would be to hide the axes and their grid lines, and use the new Graticule type introduced in Measurement Studio 2019:

<ni:Graph>
    <ni:Graph.Axes>
        <ni:AxisDouble Visibility="Collapsed" MajorGridLines="{x:Null}" Orientation="Horizontal" />
        <ni:AxisDouble Visibility="Collapsed" MajorGridLines="{x:Null}" Orientation="Vertical"   />
    </ni:Graph.Axes>
    <ni:Graph.Children>
        <ni:Graticule />
    </ni:Graph.Children>
</ni:Graph>

This shows unlabeled division marks, in the style of a digital scope.

 

If you would like to keep the axis labels, then you could use the approach from this question: How to make the X axis to the middle position of graph in WPF?

~ Paul H
0 Kudos
Message 2 of 2
(2,066 Views)