LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlapping Bars in XY Graph

Solved!
Go to solution

Hello

 

I'm plotting bars in a XY graph.

If the X values are not in ascending order, the bars are overlapping. Bars are not overlapping, if X values are in ascending order.

 

Is there something I do wrong? Can some confirm this? Is this a bug?

Using LV 13.0.1f2 (32Bit)

 

Regards

UliB

 

 

 

 

 

 

0 Kudos
Message 1 of 3
(2,679 Views)
Solution
Accepted by topic author UliB

This is expected behaviour.  The width of bars is calculated based on the current and previous point.  Therefore if your points are in different orders, you will get different size bars, since the calculation for each bar's width will be different.  The bars are calculated such that the current and previous bars do not overlap, so if your X values are strictly increasing, then none will overlap, but if you have some X values that are out of order, bars will probably overlap.



Message 2 of 3
(2,657 Views)

Hello VItant,

 

thank you for your answer. I didn't know this. I expected the bars to have the same width. Is this documented anywhere, e.g. in the help?

So, if I want to have the bars the same width, I have to sort the X values and have the same interval between all X values.

E.g. I have to fill gaps in my X values (1,2,4,5 --> 1,2,3,4,5).

 

I think there is one minor correction to your anser: The width of bars is calculated based on the current and the next point.

 

Regards,

UliB

 

 

 

0 Kudos
Message 3 of 3
(2,639 Views)