Please render the line labels in front of the lines.
- Dominant language
- Dart
- Stars
- 7.6k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 2
Description
There are multiple lines and line labels in extraLinesData. The labels overlap with other lines and obscure the text. It would be better if the labels were rendered in front of the lines.
My code
```dart:
extraLinesData: ExtraLinesData(
extraLinesOnTop: true,
verticalLines: [
if (max1LevelValue != null)
VerticalLine(
x: max1LevelValue!,
color: Colors.yellow,
strokeWidth: 3,
label: VerticalLineLabel(
show: true,
alignment: Alignment.topLeft,
padding: const EdgeInsets.only(right: 5, bottom: 5),
style: Theme.of(context).textTheme.bodySmall!,
labelResolver: (line) => '1차',
),
),
if (min1LevelValue != null)
VerticalLine(
x: min1LevelValue!,
color: Colors.yellow,
strokeWidth: 3,
label: VerticalLineLabel(
show: true,
alignment: Alignment.topRight,
padding: const EdgeInsets.only(left: 5, top: 5),
style: Theme.of(context).textTheme.bodySmall!,
labelResolver: (line) => '1차',
),
),
if (max2LevelValue != null)
VerticalLine(
x: max2LevelValue!,
color: Colors.red,
strokeWidth: 3,
label: VerticalLineLabel(
show: true,
alignment: Alignment.topLeft,
padding: const EdgeInsets.only(right: 5, bottom: 5),
style: Theme.of(context).textTheme.bodySmall!,
labelResolver: (line) => '2차',
),
),
if (min2LevelValue != null)
VerticalLine(
x: min2LevelValue!,
color: Colors.red,
strokeWidth: 3,
label: VerticalLineLabel(
show: true,
alignment: Alignment.topRight,
padding: const EdgeInsets.only(left: 5, top: 5),
style: Theme.of(context).textTheme.bodySmall!,
labelResolver: (line) => '2차',
),
),
],
horizontalLines: [
if (currentDepth != null)
HorizontalLine(
y: currentDepth!,
color: Colors.black,
strokeWidth: 1,
label: HorizontalLineLabel(
show: true,
alignment: Alignment.topRight,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Colors.black,
),
labelResolver: (line) => '현재 굴착 깊이',
),
),
],
),
```
Contributor guide
Research direction
Start by tracing ExtraLinesData rendering for VerticalLineLabel and HorizontalLineLabel in the line-chart path. Reproduce the supplied configuration with multiple extra lines, then verify that labels render above the lines without obscuring their text.
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
- Mostly clear
- Newbie friendliness
- 45/100