Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WPF Graph : How to remove axes and lines ?

Solved!
Go to solution

Hi, 

 

I'm trying to remove the axes and the lines from a Graph in WPF. Anyone know how to proceed?

 

Thanks!

0 Kudos
Message 1 of 4
(3,604 Views)
Solution
Accepted by Vikogy

You can set MajorGirdLines to null to hide the grid lines within the plot area, and you can set Visibility to Collapsed to hide the axis itself.

~ Paul H
0 Kudos
Message 2 of 4
(3,579 Views)
Solution
Accepted by Vikogy

Hi, Thanks for your response. For the axis it works, but I can't set MajorGirdLines to null.

<ni:Graph.Axes>
                    <ni:AxisDouble Visibility="Collapsed" MajorGridLines="null"  x:Name="AxeX" Orientation="Horizontal" ScaleKind="LogarithmBase2" />
                    <ni:AxisDouble Visibility="Collapsed" x:Name="AxeY" Orientation="Vertical" ScaleKind="LogarithmBase2" />
                </ni:Graph.Axes>

 

Can you help me please ?

 

Edit : Ok nevermind I found it 🙂

 AxeX.MajorGridLines = null;
 AxeY.MajorGridLines = null;

0 Kudos
Message 3 of 4
(3,551 Views)

Sorry for not mentioning it before: in XAML, you can use Property="{x:Null}" to set a property to null.

~ Paul H
0 Kudos
Message 4 of 4
(3,544 Views)