08-05-2013 07:45 AM
Hi, Paul!
Is it possible to have color scale control at regular Graph? I made graph with 2 intensity plots which does work nicely, but color scale is missing.
Alternatively, is it possible to have IntensityGraph with 2 plots (and different color coding)?
08-05-2013 08:24 AM - edited 08-05-2013 08:26 AM
Yes, you can render the color scale control like this. It's not pretty, but NI is working on a better way I believe.
xmlns:ni="http://schemas.ni.com/controls/2009/xaml/presentation" xmlns:niPrimitives="http://schemas.ni.com/controls/2009/xaml/presentation/primitives" <niPrimitives:RegionPanel Margin="7,2,0,17"> <niPrimitives:RegionPanel.LayoutDefinitions> <niPrimitives:ContentDefinition Name="uxColorScaleContent" /> <niPrimitives:EdgeDefinition Name="uxEdgeDefinition" Parent="uxColorScaleContent" From="0,0" To="1,1" /> </niPrimitives:RegionPanel.LayoutDefinitions> <niPrimitives:ScalePresenter niPrimitives:RegionPanel.Region="uxEdgeDefinition" niPrimitives:RegionPanel.RelativeWidth="1" niPrimitives:LayeredGraph.TargetLocation="Far" Owner="{Binding ElementName=uxGraph}" x:Name="uxColorScale"> </niPrimitives:ScalePresenter> </niPrimitives:RegionPanel> <ni:Graph x:Name="uxGraph"/>