NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Trusted Enthusiast
for(imstuck)
Posts: 2,064
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?



Greg Freeman - CLA, LV Version 2012, 2011, and 2010

G Systems, LP


Trusted Enthusiast
for(imstuck)
Posts: 2,064
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...)

 



Greg Freeman - CLA, LV Version 2012, 2011, and 2010

G Systems, LP


Knight of NI
RavensFan
Posts: 13,238
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:

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page