The behavior of Horizontal Bar series CustomBarHeight has changed from version 7.06 to 7.07. I am using small values of CustomBarHeight to create many thin horizontal lines that can be located at any vertical data value and whose horizontal width can be varied. By varying the value of CustomBarHeight the thickness of the individual lines can be changed.
For TChart 7.06 the actual number of pixels plotted on the HorizBar series is CustomBarHeight + 1 :
CustomBarHeight=0 shows 1 pixel (if BarWidthPercent := 0)
CustomBarHeight=1 shows 2 pixels with data value at the upper pixel,
CustomBarHeight=2 shows 3 pixels with data value at center pixel,
CustomBarHeight=3 shows 4 pixels with data value at pixel below center,
i.e. the data value (and a cursor tool linked to it) is centered within the bar.
For TChart 7.07 :
CustomBarHeight := 0 shows as 1 pixel with cursor centered within bar,
CustomBarHeight := 1 shows no bar,
CustomBarHeight := 2 shows as 1 pixel but with bar above cursor
CustomBarHeight := 3 shows as 2 pixels but with bar above cursor
CustomBarHeight := 4 shows as 3 pixels but with bar above cursor
I am using a horizontal cursor tool and customers are complaining that with 7.07 the cursor location appears below the actual bar position, i.e. the cursor is not centered within the thicker bar line.
This can be shown using this code for a 2D HorizBar series :
series1.BarPen.Visible := false;
series1.BarWidthPercent := 0;
series1.CustomBarHeight := 0;
series1.FillSampleValues(5);
Then use a spinedit control's OnChange event :
series1.CustomBarHeight := spinedit1.Value;
With 7.07 the bar (for 2 or 3 pixel thick bars) is drawn slightly above the actual vertical axis data value.
This behavior is no doubt not a typical usage of this series and thus perhaps considered trivial but I am wondering if this change crept in as an unintended consequence of some other change and therefore could be changed back.
Thanks,
Steve
HorizBar CustomBarHeight behavior changed from 7.06 to 7.07
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Steve,
I could reproduce the issue here. Some changes were applied to solve other problems with BarWidthPercent when it was set to 100%. I will add your request to our bug list to be reviewed again.
I could reproduce the issue here. Some changes were applied to solve other problems with BarWidthPercent when it was set to 100%. I will add your request to our bug list to be reviewed again.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Narcis,
Did these changes happen to address the issue of "Horizontal Bar series does not show the correct bar width after zooming vertically. If BarWidthPercent is 100, the horizontal center of the bar position appears lower on the vertical axis than it should be."
http://www.teechart.net/support/viewtop ... ight=#9773
Steve
Did these changes happen to address the issue of "Horizontal Bar series does not show the correct bar width after zooming vertically. If BarWidthPercent is 100, the horizontal center of the bar position appears lower on the vertical axis than it should be."
http://www.teechart.net/support/viewtop ... ight=#9773
Steve
Hi Steve,
the changes has been applied specially in order to fix some problems with Bar or HorizBar with BarWidthPercent to 100, with stack, and also having changed the pointsperpage.
the changes has been applied specially in order to fix some problems with Bar or HorizBar with BarWidthPercent to 100, with stack, and also having changed the pointsperpage.
Pep Jorge
http://support.steema.com
http://support.steema.com