Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WPF Intensity Graph gridlines not visible on plotted data

Hi, I need to break up my intensity graph data into a visible grid.  Please advice on how this can be accomplished.

Thank you

0 Kudos
Message 1 of 4
(4,761 Views)

Although you can configure the grid lines to appear above the plots, to draw in between the data points you will want a custom renderer. I have attached an example grid renderer, which you can customize to fit the data you display. If you add an instance of GridRenderer to the Children collection on your graph, it will draw grid lines for each axis passed to the constructor.

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

Hello, could you explain how you can configure the grid lines to appear above the plots?

 

- Henry

0 Kudos
Message 3 of 4
(596 Views)

To get the regular grid lines to appear above the plots, you use the same LayeredGraph.Position attached property as the GridRenderer example above. The only trick is this property needs to be set on the renderer for the GridLines, which requires a little code:

 

public class CustomGridLines : GridLines {
    public override GridLinesRenderer<TData> TryGetRenderer<TData>( IDataMapper<TData> dataMapper ) {
        var renderer = base.TryGetRenderer( dataMapper );
        if( renderer != null )
            LayeredGraph.SetPosition( renderer, GraphLayerPosition.AbovePlots );
        return renderer;
    }
}

 

 

In your graph axes, use this custom object for the major or minor grid lines to show them above plots.

~ Paul H
Message 4 of 4
(580 Views)