From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stacked bar chart with custom x axis labels

Is there a way to build this simple chart in labview that I did in Excel?  I need to have many x axis labels and there could be from 5 to 100 of them depending on the data set. 

0 Kudos
Message 1 of 8
(5,318 Views)

Hi id,

 

Here is a link to an example VI that uses nested loops to turn a table into a bar graph.

https://decibel.ni.com/content/docs/DOC-2241

 

Hope this helps.

 

Regards,

 

Anna L

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(5,270 Views)

Thanks the nested loop example helps a little but it does not create a "stacked" bar graph but rather a grouped bar graph.  I would probably have to sort and overlap the bars in order of magnitude for the thing to work.

 

The other issue is that the caetgory names on the x axis that I need to use are long and cannot fit horizontally so I need them to be vertical.  The 3D bar charts have this ability with their valuepair properties but I dont see away with the old 2D graphs.... 

0 Kudos
Message 3 of 8
(5,261 Views)

Hi id,

 

Thank you for your response. I hope you are doing well.

 

There is an example in the LabVIEW Example Finder (Help>>Find Examples..). It is titled, Stacked Bar Graph. You can search for it if you switch tabs in the Example Finder window. This should help you create a stacked bar graph. To help you with your veritcal axis labels, here is a knowledge base link that details the process:

 

 

How Can I Customize the X-Axis Labels On My LabVIEW Graph/Chart So They Appear Vertically?

http://digital.ni.com/public.nsf/allkb/1F7C1B089E45908E86256C8C0051894A?OpenDocument

 

Let me know if these examples help.

 

Best regards,

 

Anna L

 

 

Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(5,244 Views)

Thanks Anna but the means of putting labels vertically is kind of "cheesy" as it overlays controls over the x axis values.  This approach only works for a graph that you dont zoom or change the x axis range on for interactive viewing.   I tried doing it with a picture control overlapping and it gets pretty complex.  NI definitely needs to add this feature.

0 Kudos
Message 5 of 8
(5,242 Views)

Hi id,

 

Thanks for your response. You can definitely post the vertical axis labels as an idea in the LabVIEW Idea Exchange. Here's the link if you are interested:

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas

 

Best Regards,

Anna L

Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(5,225 Views)

Anna, do you know of an Active X or .NET control that can be used instead to allow this feature?

0 Kudos
Message 7 of 8
(5,221 Views)

Hello id,

 

I don't believe there is an Active X or .NET control that can be used for the feature. If you are interested in trying it in CVI, there is a way to manipulate your axis labels. There is more description of the process in this Knowledge Base article here: 

 

How Can I Customize the X-Axis Labels on My CVI Graph So That They show Vertical Text Labels? http://digital.ni.com/public.nsf/allkb/C3637DA680F5407486256C8C0058B7DA?OpenDocument

 

Regards,

 

Anna L

Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(5,201 Views)