Skip to content

feat: Add textAlign property to FlLineLabel, HorizontalLineLabel, and VerticalLineLabel#2110

Open
kiironoaki wants to merge 2 commits into
imaNNeo:mainfrom
kiironoaki:main
Open

feat: Add textAlign property to FlLineLabel, HorizontalLineLabel, and VerticalLineLabel#2110
kiironoaki wants to merge 2 commits into
imaNNeo:mainfrom
kiironoaki:main

Conversation

@kiironoaki

@kiironoaki kiironoaki commented Jun 28, 2026

Copy link
Copy Markdown

Description

Add a textAlign property to the FlLineLabel base class and its subclasses HorizontalLineLabel and VerticalLineLabel. The property controls text alignment within the label bounding box and is passed directly to the underlying TextPainter. A second layout pass with maxWidth set to the natural text width ensures alignment takes effect for multi-line labels (e.g. right-aligning a short value line above a wider time line). Default value is TextAlign.left, so existing behavior is unchanged.

Checklist

  • I have followed the [Contributor Guide] when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///.
  • I have updated/added relevant examples in example.

Breaking Change?

  • No, this PR is not a breaking change.

Example

1080-489-max

@kiironoaki kiironoaki changed the title Add textAlign property to FlLineLabel, HorizontalLineLabel, and VerticalLineLabel feat: Add textAlign property to FlLineLabel, HorizontalLineLabel, and VerticalLineLabel Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant