imaNNeo / imaNNeo/fl_chart

LineChart visual error

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

Description

**Describe the bug**
End of the line literally looks weird (not really being connected). Looks fine when [isCurved] is true, only happens when it's false.

**To Reproduce**
`import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';

void main() async {
return runApp(
MaterialApp(
home: Scaffold(
body: Center(
child: AspectRatio(
aspectRatio: 2,
child: LineChart(
LineChartData(
lineBarsData: [
LineChartBarData(
spots: [
FlSpot(1, 1),
FlSpot(2, 2),
FlSpot(3, 1),
FlSpot(4, 2),
FlSpot(5, 1),
],
isCurved: false,
curveSmoothness: 0.15,
preventCurveOverShooting: true,
dotData: FlDotData(
show: false,
),
),
],
),
),
),
),
),
),
);
}`

**Screenshots**
![Simulator Screenshot - iPhone 15 Pro - 2024-06-13 at 14 02 51](https://github.com/imaNNeo/fl_chart/assets/93118583/f0de49b1-bf8e-4cce-a3c8-8583202177b6)

**Versions**
- Flutter 3.22.2
- fl_chart: 0.68.0

Contributor guide

Open the contributing guide

Research direction

Start by running the provided LineChart reproduction with Flutter 3.22.2 and fl_chart 0.68.0, focusing on LineChartData and LineChartBarData when isCurved is false. Trace the LineChart rendering entry point to find why the final segment is not connected; done means the line end renders correctly while preserving the curved behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
frontend, mobile-dev
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.