07-21-2015 11:22 AM
Hi, I need to break up my intensity graph data into a visible grid. Please advice on how this can be accomplished.
Thank you
07-21-2015 05:37 PM
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.
11-16-2022 10:39 AM
Hello, could you explain how you can configure the grid lines to appear above the plots?
- Henry
11-16-2022 11:36 AM
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.