imaNNeo / imaNNeo/fl_chart

How to get rid of the extra spacing at the chart's left/ride side?

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

Description

Hi,

I'm using the example you provided, bar_chart_sample1. When putting the chart in a `SizedBox(width: 300, height: 300)` and making the chart's background color red, there is spacing at the left and right side (see the yellow markers):

![Image](https://github.com/user-attachments/assets/75c91a96-702d-4122-80c8-4cdb0bc7d69f)

I have not found anything to get of that, so the chart just occupies the space it requires.

Is there any property I've overlooked?

Using `alignment: BarChartAlignment.spaceBetween,` is not an option, because I want to define the `groupSpacing`.

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the bar_chart_sample1 example and reproduce the chart inside SizedBox(width: 300, height: 300) with a red background. Investigate how the chart handles alignment, groupSpacing, and its left and right padding. Done means the extra spacing is removed while a custom groupSpacing remains possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.