fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

where is the SideTitleWidget? I can't find it while trying to use BarChartSample7

Open adnanatif opened this issue 2 years ago • 4 comments

** Don't make a duplicate issue. You can search in issues to make sure there isn't any already opened issue with your concern.

Describe the bug A clear and concise description of what the bug is.

To Reproduce Provide us a completely reproducible code (contains the main function) in a main.dart file, it helps us to find the bug immediately.

Screenshots If applicable, add screenshots, or videoshots to help explain your problem.

Versions

  • which version of the Flutter are you using?
  • which version of the FlChart are you using?

adnanatif avatar May 25 '22 12:05 adnanatif

AxisTitles( sideTitles: SideTitles( showTitles: true, reservedSize: 36, getTitlesWidget: (value, meta) { final index = value.toInt(); return SideTitleWidget( axisSide: meta.axisSide, child: _IconWidget( color: BarChartSample7.dataList[index].color, isSelected: touchedGroupIndex == index, ), ); }, ), ),

adnanatif avatar May 25 '22 12:05 adnanatif

red line on SideTitleWidget how should i fix it..

adnanatif avatar May 25 '22 12:05 adnanatif

Try just returning the IconWidget (not a SideTitleWidget). I had a similar issue and just returned a TextWidget which worked fine.

roly151 avatar May 27 '22 07:05 roly151

How did you get this error? Are you copying the BarChartSample7 code to your project?

imaNNeo avatar May 29 '22 14:05 imaNNeo