imaNNeo/fl_chart

can getTitlesWidget function transmit x's index?

Open

#1170 aperta il 14 ott 2022

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)Dart (1964 fork)batch import
Fundamentalenhancementgood first issue

Metriche repository

Star
 (7513 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

AxisTitles( sideTitles: SideTitles(showTitles: true, getTitlesWidget: (double value, TitleMeta meta) { return SideTitleWidget( axisSide: meta.axisSide, child: Text(value.toString()), ); }), )

Hello, in above code, the getTitlesWidget function transmit x's value. Can it transmit x's index in the future? I have a list consist of map. The map has value and title, I want give the value to x, and give the title to getTitlesWidget. If x's index can be transmitted to getTitlesWidget function, I can use it to achieve title from my list directly. Thank you very much!

Guida contributor