HorizBar CustomBarHeight behavior changed from 7.06 to 7.07

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

HorizBar CustomBarHeight behavior changed from 7.06 to 7.07

Post by SteveP » Wed Jul 26, 2006 5:16 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 27, 2006 12:55 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Post by SteveP » Thu Jul 27, 2006 1:37 pm

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

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 31, 2006 10:27 am

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.

Post Reply