cancel
Showing results for 
Search instead for 
Did you mean: 

Graph with String as Y-Axis

cmdrb
Member

Graph with String as Y-Axis

Message contains an image

Need help on what graph to use for this:

 
 

WorkOrder.jpg

10 REPLIES 10
altenbach
Knight of NI

Re: Graph with String as Y-Axis

I would use a 1D array of clusters where each element is a string and a slider.

 

You can also draw everything on a 2D picture (text, filled boxes, etc)

cmdrb
Member

Re: Graph with String as Y-Axis

Thanks for the reply. If a slider will be used, how are you going to plot the FAIL?

GerdW
Knight of NI

Re: Graph with String as Y-Axis

Hi CmdrB,

 


@cmdrb wrote:

Thanks for the reply. If a slider will be used, how are you going to plot the FAIL?


A slider control can have more than just one slider. And there are several options for the fill color(s)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Highlighted
altenbach
Knight of NI

Re: Graph with String as Y-Axis

Message contains an image Message contains an attachment

Quick example:

 

altenbach_0-1717859256787.png

 

Bob_Schor
Knight of NI

Re: Graph with String as Y-Axis

Message contains an image Message contains an attachment

I looked at your graph, and thought "How would I make a plot with a horizontal bar, the first 90% Green, the next 8% Red, and the last 2% Gray?", and came up with what I was going to suggest here as a possibility.  But when I clicked "Reply", and re-read the Title of the Post, I asked myself "What did @cmdrb mean by Graph with String as Y-Axis?".  That's when I paid attention to the Y tick labels "Op-01" ...  Oops, I just figured out how to do that, as well (maybe) ...

 

So let me forget about labeling the Y Axis for the moment, and talk about how to make a horizontal plot that goes from 0 to 100, with G% colored Green, R% colored Red, and the remaining 100-G-R% colored Gray.  Let's place this line at height H.  Plot three 2-point lines:

((0, H), (G, H)), ((G, H), (G+R, H)), ((G+R, H), (100, H)).  Color the first line Green, the second Red, the third Gray.  You can also increase the thickness of the lines, but to get as thick a bar as you show on your diagram, you'd probably need to plot several identical lines, varying the Y value by about .05 each time, as the thickest line (5) appears to be about 0.05 units high when plotted.  And trust me, unless you've done a whole lot of LabVIEW XY Plotting, making such a graph is not a lot of fun.

 

Here's what I got for my effort:

Operation Summary Graph FP.png

 I "colored" the three sub-plots "by hand" from the Graph Properties page, and also adjusted the Line thickness to the maximum.  I'm attaching a Snippet (saved as LabVIEW 2021) if you want to look at the code -- not so difficult, but I've not done much XY plotting, and figuring it out from the Help was, shall we say, not a big help (thank goodness for Examples).

 

Bob Schor

altenbach
Knight of NI

Re: Graph with String as Y-Axis

Message contains a hyperlink Message contains an image

Yes, I think the main(?) issue was that they wanted strings as Y axis markers. (QUOTE: "Graph with String as Y-Axis")

 

This idea would have helped!

 

But xy graphs also have horizontal bar plots, no need to jump through flaming hoops!

 

altenbach_0-1717865919083.png

 

altenbach
Knight of NI

Re: Graph with String as Y-Axis

Message contains an image Message contains an attachment

@altenbach wrote:

But xy graphs also have horizontal bar plots, no need to jump through flaming hoops!


Here's how this could look like:

 

altenbach_0-1717867053423.png

 

 

altenbach
Knight of NI

Re: Graph with String as Y-Axis

Message contains an image Message contains an attachment

And here's how you could add text using the plotImages Overlay

(quick draft. could easily be tuned to the actual size and marker positions)

 

altenbach_1-1717868441212.png

 

Of course at one point it would probably be easier to just use a 2D image for everything....

 

 

 

Bob_Schor
Knight of NI

Re: Graph with String as Y-Axis

@Altenbach, you never cease to amaze us!

 

Bob Schor