Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Side titles issue #1710

Open
kamaravichow opened this issue Jul 12, 2024 · 1 comment
Open

Side titles issue #1710

kamaravichow opened this issue Jul 12, 2024 · 1 comment

Comments

@kamaravichow
Copy link

 Widget bottomTitles(double value, TitleMeta meta) {
        final titles = <String>['Mn', 'Te', 'Wd', 'Tu', 'Fr', 'St', 'Su'];
    
        final Widget text = Text(
          titles[value.toInt()],
          style: const TextStyle(
            color: Color(0xff7589a2),
            fontWeight: FontWeight.bold,
            fontSize: 14,
          ),
        );
    
        return SideTitleWidget(
          axisSide: meta.axisSide,
          space: 16, //margin top
          child: text,
        );
      }

If you use the value as index to get the side title if the values are same to two items doesn't it show the same side title ? How did you design the library to show unique side title for each index ?

@imaNNeo
Copy link
Owner

imaNNeo commented Jul 19, 2024

It is not the value of the chart data, it is the value of the number in one axis. So maybe the naming is confusing.
Does it make sense if we name it axisValue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants