Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axisNameWidget not centered based on axis/chart height #1847

Open
valentinkatic opened this issue Jan 13, 2025 · 0 comments
Open

axisNameWidget not centered based on axis/chart height #1847

valentinkatic opened this issue Jan 13, 2025 · 0 comments

Comments

@valentinkatic
Copy link

valentinkatic commented Jan 13, 2025

I am using a simple bar chart with a leftTitles configuration that includes an axisNameWidget.

The title configuration is as follows:

AxisTitles(
  axisNameWidget: Text(
      axisTitle,
      style: axisTitleTextStyle,
  ),
  ...
)

Expected Behavior:
I expected the axisNameWidget (the axis name) to be centered relative to the axis/chart height.

Actual Behavior:
The axisNameWidget is centered based on the full chart height, which includes:

  • The chart itself
  • Bottom side titles
  • Bottom axis name

As a result, the axis title (as shown in the screenshot) is positioned between the values 20-40, whereas the expected position is between 40-60 (center of the chart).

EDIT: The same issue occurs on the other axis where the title "Months" is positioned between March and April. However, since the center label is April, the expected title position should be directly below April.

Screenshot:
Screenshot_20250113_151024

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

No branches or pull requests

1 participant