Issue with Aligning BarChart and LineChart on Same X-Axis in fl_chart
- Dominant language
- Dart
- Stars
- 7.6k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 2
Description

Hello,
I am currently facing an issue while trying to render both a BarChart and a LineChart simultaneously using the fl_chart plugin in Flutter. The main challenge is aligning them on the same X-axis since it seems that the x-axis data (barChartData and lineChartData) do not align perfectly, which prevents the charts from overlapping properly on the positions.
Could someone please advise on how to share the x-axis data between these two chart types effectively so that their alignment is consistent?
Thank you for your assistance.
Contributor guide
Research direction
Start by reproducing the reported Flutter setup with both BarChartData and LineChartData and compare how their x-axis positions are calculated. Confirm whether shared x-axis data can align the overlaid charts, and document or test the resulting behavior once the alignment is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100