imaNNeo / imaNNeo/fl_chart

maxY value title color is not apply true with opacity color.

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

Description

**Describe the bug**
Hi, I'm using fl_chart for my app, I faced with color of maxY issue. When I defined leftTitles with text color has opacity, it display maxY wrong color ( still right text style).

**To Reproduce**
This is my code for left side title:
```
leftTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
interval: intervalY == 0 ? 1 : intervalY,
getTitlesWidget: leftTitleWidgets,
reservedSize: 51,
),
),
```
```
Widget leftTitleWidgets(double value, TitleMeta meta) {
return SideTitleWidget(
axisSide: meta.axisSide,
child: Container(
alignment: Alignment.centerRight,
child: Text(
((value - 10) / 1000000000).toStringAsFixed(1),
textAlign: TextAlign.right,
style: ThemeUtils.textStyle.subText
.copyColor(ThemeUtils.color.primary10),
),
),
);
}
```

**Screenshots**
![Screenshot 2024-06-11 at 13 50 24](https://github.com/imaNNeo/fl_chart/assets/18292488/2a14d100-16f1-492d-b63a-cbecb921d551)
![Screenshot 2024-06-11 at 13 53 29](https://github.com/imaNNeo/fl_chart/assets/18292488/b65817f9-149e-444c-9e69-81c241748f52)
![Screenshot 2024-06-11 at 13 53 39](https://github.com/imaNNeo/fl_chart/assets/18292488/f68e4b8c-3caf-4ae9-b9fb-017608f7b762)

**Versions**
- Flutter version: 3.7.12 stable
- FlChart version: 0.62.0

Please help or notice me if this bug is fixed on new version or whether it is new bug. Thank for advanced! @imaNNeo

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the maxY left-title rendering with the supplied leftTitles, SideTitles, getTitlesWidget, and semi-transparent text style example. Trace how the maxY title is rendered compared with the other titles; done means the configured opacity color is preserved for maxY as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
frontend, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.