Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,108
    • Issues 2,108
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #34861
Closed
Open
Created Jan 13, 2019 by FPC Admin account@fpc_adminOwner

Incorrect placement of series labels for stacked series in case of non-linear axis transformations

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
Assignee
Assign to
Time tracking