Skip to content

feat: Add aboveChartBoxArea to TooltipDirection for BarTouchTooltipData#2098

Open
harshyadavDeveloper wants to merge 1 commit into
imaNNeo:mainfrom
harshyadavDeveloper:feature/add-aboveChartBoxArea-tooltip-direction
Open

feat: Add aboveChartBoxArea to TooltipDirection for BarTouchTooltipData#2098
harshyadavDeveloper wants to merge 1 commit into
imaNNeo:mainfrom
harshyadavDeveloper:feature/add-aboveChartBoxArea-tooltip-direction

Conversation

@harshyadavDeveloper
Copy link
Copy Markdown

Description

Adds a new aboveChartBoxArea value to the TooltipDirection enum in BarTouchTooltipData. When set, the tooltip always renders above the entire chart box area, regardless of the bar rod's height or value. This mirrors the showOnTopOfTheChartBoxArea behavior already available in LineChart.

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?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #2026

@harshyadavDeveloper
Copy link
Copy Markdown
Author

Hi @imaNNeo 👋

This PR adds a new aboveChartBoxArea value to the TooltipDirection enum for BarTouchTooltipData, as requested in #2026.

The change ensures the tooltip always renders above the entire chart box area regardless of the bar rod's height — similar to how showOnTopOfTheChartBoxArea works in LineChart.

Changes made:

  • Added TooltipDirection.aboveChartBoxArea to the enum in bar_chart_data.dart
  • Handled the new direction in the tooltip positioning logic in bar_chart_painter.dart
  • Added BarChartSample9 in the example app to demonstrate the feature visually

Happy to add tests or make any adjustments based on your feedback!

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.

Add showOnTopOfTheChartBoxArea for BarTouchTooltipData

1 participant