imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.77k stars 1.75k forks source link

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

Open doanngoctu95 opened 3 months ago

doanngoctu95 commented 3 months ago

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 Screenshot 2024-06-11 at 13 53 29 Screenshot 2024-06-11 at 13 53 39

Versions

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

ksw2000 commented 3 months ago

I tested on FlChart version 0.68.0 and did not encounter the issue you mentioned. Would you be able to try to upgrade FlChart?

imaNNeo commented 3 months ago

@doanngoctu95 Can you please answer @ksw2000's question and check it with the latest version?