imaNNeo / imaNNeo/fl_chart

Setting minY for Line Chart Causes Rendering outside of Container

Open
#870 6 comments 4 reactions 0 assignees View on GitHub
enhancement good first issue Line Chart
Dominant language
Dart
Stars
7.6k
Forks
2k
Avg merge
9d 1h
Merged PRs (30d)
2

Description

**Describe the bug**
Structurally, I have a `LineChart` within a `Container` that's used to constrain the chart's dimensions. When supplying a `minY` to `LineChartData`, the chart display extends outside the bounds of the `Container`. Normally, I would expect the chart to scale to the size of the container in all cases.

**To Reproduce**

Code snippet:
Screen Shot 2022-01-06 at 10 19 36 AM

The y values supplied range between 35,000 to 65,000

**Screenshots**

Without specifying a `minY`:
Screen Shot 2022-01-06 at 10 19 59 AM

Specifying a `minY`:
Screen Shot 2022-01-06 at 10 18 29 AM

**Versions**
- which version of the Flutter are you using?
2.5.3
- which version of the FlChart are you using?
0.40.6

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the LineChart and LineChartData rendering behavior when minY is supplied, using the reported Flutter 2.5.3 and FL Chart 0.40.6 setup. Reproduce the chart inside a constrained Container with y values from 35,000 to 65,000; done means the chart remains within the Container bounds with and without minY.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.