Hi Nguyen,
We are validating your query at our end and will update further details in one business day.
Regards,
Sriram Kiran
Hi Nguyen,
Greetings from Syncfusion.
The requirement can be met by using the legendItemBuilder callback. In that, return a Text widget with overflow (TextOverflow.ellipsis). We have shared a sample for your reference below.
Code snippet:
|
legend: Legend( isVisible: true, overflowMode: LegendItemOverflowMode.wrap, position: LegendPosition.bottom, legendItemBuilder: (legendText, series, point, seriesIndex) => const Text('Fornix L3 DONG DIEN SENSOR 2(S2) Fornix L3 D3', overflow: TextOverflow.ellipsis), ), |
Output :
Regards,
Lokesh Palani.
when using legendItemBuilder, icon chart disapper, how can i get icon chart and show. Sorry my english is not good. Thank you
Hi Nguyen,
We are validating your requirement at our end and will update further details in one business day.
Regards,
Lokesh Palani
Hi Nguyen,
The legendItemBuilder callback is used to customize the legend default appearance. So, only the default legend icon will not display for your case. However, you can achieve your requirement by wrapping the Icon and Text widgets in a Row widget as per the following code snippet, and we have shared a sample for your reference below.
Code snippet;
|
legend: Legend( isVisible: true, overflowMode: LegendItemOverflowMode.wrap, position: LegendPosition.bottom, legendItemBuilder: (legendText, series, point, seriesIndex) => Row( children: const [ Icon(Icons.area_chart), Flexible( child: Text('Fornix L3 DONG DIEN SENSOR 2(S2) Fornix L3 D3', overflow: TextOverflow.ellipsis), ), ], ), ),
|
Output ;
Regards,
Lokesh Palani.