NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Trusted Enthusiast
GregFreeman
Posts: 2,384
0 Kudos
Accepted Solution

variable width bars in bar chart

[ Edited ]

I would like to plot a graph that looks like a bar chart, but I want to be able to specify the widths of the bars. For instance, if the user enters 0 for the x-min, 6 for the x-max then 5,000 for y-max I want to draw a bar that starts at 0, has a width of 6 and a height of 5,000. It seems the bar chart options on an xy graph don't allow for variable width, but instead center around whatever x value is associated with a particular y value.

 

Can I do this without actually having to manually plot each rectangle's vertical and horizontal line?




CLA, LabVIEW Versions 2010-2013



Trusted Enthusiast
GregFreeman
Posts: 2,384
0 Kudos

Re: variable width bars in bar chart

[ Edited ]

Here's my solution (thanks snippet for replacing my local with a beautiful property node...)

 




CLA, LabVIEW Versions 2010-2013



Knight of NI
RavensFan
Posts: 16,070
0 Kudos

Re: variable width bars in bar chart


for(imstuck) wrote:

Here's my solution (thanks snippet for replacing my local with a beautiful property node...)

 

 



Use the Code Capture Tool and you won't have this problem.:smileywink: