Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to display limit "range"

Solved!
Go to solution

I have to test every single point on my plot against Min/Max values specific to location.  I made everything work but I'd like to better indicate valid channel on the Graph.

This is what I have...  As you can see, the bold blue line is the actual data and thin blue lines represent the valid channel my data has to fall in.  If it's outside the channel, I mark those points in red.

Current.PNG

 

This ^ is sufficient but I'd like to make something like picture below, if possible and isn't "expensive" (I mocked this up in Painshop):

Desired.png

 

Thanks!

0 Kudos
Message 1 of 6
(5,009 Views)
Solution
Accepted by topic author kirko7

("Painshop" — that must have hurt! 🙂


I would suggest using an AreaPlotRenderer for the minimum and maximum plots, configured with a FillBaseline of NegativeInfinity and PositiveInfinity, respectively:


    <ni:Graph>
        <ni:Graph.Plots>
            <ni:Plot Label="Minimum Plot">
                <ni:AreaPlotRenderer FillBaseline="NegativeInfinity" />
            </ni:Plot>
            <ni:Plot Label="Maximum Plot">
                <ni:AreaPlotRenderer FillBaseline="PositiveInfinity" />
            </ni:Plot>
        </ni:Graph.Plots>
    </ni:Graph>

~ Paul H
0 Kudos
Message 2 of 6
(5,003 Views)

Bucket Fill is your friend LOL.

 

I love how flexible your tools are!  This is working very nicely but I just wanted to ask if it's possible to set Opacity in this line or does it have to be done separately down the road.  I have a hardcoded collection of plots that I use throughout my applications.

Thanks!

 

 

private static readonly AreaPlotRenderer AreaPlotRendererNegative1 = new AreaPlotRenderer() { Fill = Brush1, FillBaseline = FillBaseline.NegativeInfinity };

 

0 Kudos
Message 3 of 6
(4,990 Views)
Solution
Accepted by topic author kirko7

On the "Brush1" value you are using, you could set Opacity, or use a Color with a lower alpha value (for a solid color brush).

~ Paul H
0 Kudos
Message 4 of 6
(4,985 Views)

It's a beaut!

 

final.PNG

0 Kudos
Message 5 of 6
(4,977 Views)

Very nice!

~ Paul H
0 Kudos
Message 6 of 6
(4,973 Views)