Incorrect placement of series labels for stacked series in case of non-linear axis transformations
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
When a series has several y values so that the data can be stacked, and when the y axis is logarithmic then the axis labels are placed at positions which don't have a relation to the data points.
Steps to reproduce:
Run attached demo. In the mode used when "Centered" is not checked the label connectors should start at the top of each bar - only the first level is labeled correctly; for the others the label is positioned too high.
When "Centered" is checked the label connectors should start in the center of each bar. Now even the first level is not labeled correctly any more.
Additional information:
TCustomSeries.DrawLabels contains code which is wrong in case of non-linear axis transformations:
In the following excerpt g is a graphpoint corresponding to the end of a bar, y is the data value of a stack level:
g.Y += AxisToGraphY(y);
This is wrong, the axis transformation must be applied to sum of the the axis coordinates:
ysum += y;
g.Y := AxisToGraphY(ysum);
Mantis conversion info:
- Mantis ID: 34861
- Fixed in version: 2.0
- Fixed in revision: 60071 (#c09a250d)
- Target version: 2.0