Skip to content

[BUG]: Text in circle and rectangle shapes is positioned incorrectly #7749

Closed

Description

@maxmitti

Description

In the layout, I defined two shapes which should contain a centered label text.
The SVG <text> elements are generated but positioned incorrectly.

Screenshots

Result:
Image

See x and y attributes of the <text> element:
Image

Steps to reproduce

Reproduction: https://jsfiddle.net/q7dzwnx8/2/

Both circle and rectangle have a label defined, which should be centered horizontally and vertically inside the shapes.
The SVG <text> elements are generated, but their position is totally wrong, as can be seen with the browser’s inspector

Notes

The bug seems to be present at least since version 3.0.

Activity

  1. self-assigned this
    on Apr 8, 2026
  2. camdecoster commented on Apr 8, 2026

    @camdecoster
    Contributor

    Thanks for the bug report! This has to do with the fact that label position calculations don't handle the pixel size mode properly. I'll try to get a fix together soon.

  3. changed the title [-][BUG]: Text is circle and rectangle shapes is positioned incorrectly[/-] [+][BUG]: Text in circle and rectangle shapes is positioned incorrectly[/+] on Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions