LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph with String as Y-Axis

Need help on what graph to use for this:

 
 

WorkOrder.jpg

0 Kudos
Message 1 of 11
(1,226 Views)

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)

0 Kudos
Message 2 of 11
(1,204 Views)

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

0 Kudos
Message 3 of 11
(1,170 Views)

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
0 Kudos
Message 4 of 11
(1,162 Views)
0 Kudos
Message 5 of 11
(1,149 Views)

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

0 Kudos
Message 6 of 11
(1,145 Views)

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

 

😄

0 Kudos
Message 7 of 11
(1,129 Views)

@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

 

 

Message 8 of 11
(1,122 Views)

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....

 

 

 

Message 9 of 11
(1,115 Views)

@Altenbach, you never cease to amaze us!

 

Bob Schor

Message 10 of 11
(1,111 Views)