LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble creating bar graph

Hello all,

Thought this would be simple, but basically I am trying to do a visual representation of text with quantites in a bar graph.
Basically something like this:

6                                                   ||           

5                                                   ||

4                               ||                  ||

3            ||                 ||                  ||

2            ||                 ||                  ||                   || 

1            ||                 ||                  ||                   ||                  || 
          NAME 1      NAME 2      NAME 3      NAME 4      NAME 5



Cannot figure this out. Any help would be appreciated.  Thanks.
0 Kudos
Message 1 of 12
(11,144 Views)

Unlike the scales of numeric controls, graph scales don't support text labels (wouldn't that be cool! ;))

You have several possibilities:

  1. Use a picture indicator and explicitly draw your boxes and labels. Shouldn't be too hard.
  2. Use a graph, hide the x-axis and substitute something else for the text (annotations, "text label" scale of a hidden control, etc.)
  3. Use an array where each element is a cluster of a tank and a string, for example (see image).
  4. ....



Message Edited by altenbach on 01-11-2008 08:55 AM
Message 2 of 12
(11,141 Views)
Here is an option that might be crude, but would allow for a variable number of columns.
Jim

LV 2020
0 Kudos
Message 3 of 12
(11,132 Views)
Not the most experienced user, how would you do that tank idea.  I like the look of that a lot.
0 Kudos
Message 4 of 12
(11,116 Views)
What else is that cluster Jim?  Theres something on the bottom that I cannot recognize.
0 Kudos
Message 5 of 12
(11,100 Views)

A demo of Christian's option #2 can be found here.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 12
(11,099 Views)
Roons,

I just created an empty constant by right clicking on the cursor list property to initialize a cursor for me to place on the graph.  The text (Joe) is the cursor label, but the cursor itself is not set to be visible.

Ben,
Thanks for the lesson on picture controls.  I don't understand the whole thing yet, but I will soon! 


Message Edited by lmtis on 01-11-2008 12:13 PM
Jim

LV 2020
0 Kudos
Message 7 of 12
(11,085 Views)

Roons1159 wrote:
Not the most experienced user, how would you do that tank idea.  I like the look of that a lot.

Here's a quick example for the tank version (LabVIEW 8.0).
  1. Place an empty cluster container on the front panel.
  2. Drop a tank indicator in it
  3. Drop a string indicator in it
  4. Arrange and resize as desired.
  5. Place an empty array container on the front panel.
  6. Place the cluster in it.
  7. Resize for the desired number of  bars (=array elements).

 

 
 
0 Kudos
Message 8 of 12
(11,080 Views)
is this the screen where you turn the line graph into a bar graph... I think there may be a bug, because I cannot choose any type of plots.
0 Kudos
Message 9 of 12
(11,062 Views)
Hi!

I, too, am in the same boat as Roons1159.  It seems like a simple bar graph function would have been easy enough for National Instruments to include with LabView, but I digress.

The solution posted by Ben looks promising, but unfortunately I don't have LabView 8.0, which his example is in (I'm using LabView 6.1).  Would someone be able to open his example in 8.0 and try to save it for 6.1?  I would be very grateful.  I tried implementing it myself based on the pictures, but it seems like there are a few differences.  For instance, I can't find  a "Plot Bounds" property for the XY Graph,  and the "Draw Text at Point" vi doesn't seem to have a place for the text orientation to be configured.

Thanks,
Ian
0 Kudos
Message 10 of 12
(11,055 Views)