03-27-2015 06:21 AM - edited 03-27-2015 06:23 AM
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
Solved! Go to Solution.
03-27-2015 06:45 AM
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.
03-27-2015 07:25 AM
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