imaNNeo / imaNNeo/fl_chart

Side titles issue

Open
#1,710 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

```dart
Widget bottomTitles(double value, TitleMeta meta) {
final titles = ['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 ?

Contributor guide

Open the contributing guide

Research direction

Start with the provided bottomTitles callback and inspect how SideTitleWidget and side-title values are handled in the chart API. Reproduce the case with duplicate values, then clarify the expected behavior and document or test the supported way to provide unique titles; the issue does not name a file or existing test.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
data-visualization, frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.