imaNNeo / imaNNeo/fl_chart

Issue with Aligning BarChart and LineChart on Same X-Axis in fl_chart

Open
#1,674 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
7.6k
Forks
2k
Avg merge
9d 1h
Merged PRs (30d)
2

Description

![img_v3_02b9_b2ac2c87-71af-4c68-9082-14adb089274g](https://github.com/imaNNeo/fl_chart/assets/169454444/985eced0-cc7f-4f4f-a789-59d45ec4e71d)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.