I am currently using fl_chart package. https://pub.dev/packages/fl_chart
Overview:
I am plotting two line graphs simultaneously to represent two distinct trends(ex: Income vs expense). Assume that the information involved in this are of type 'Income' and 'Expense')
Problem: As image below, I am unable to customize the tooltip label accordingly to their respective trend. Supposedly, '60' represent the 'Expense' information while '5000' represent 'Income' information.
The current workaround:
...
LineTooltipItem(
"${e.y < 0 ? 'Expense:' : e.y > 0 ? 'Income:' : ''} ${e.y == 0 ? '' : e.y.toStringAsFixed(2)}",
TextSetting.text14);
...
I have to convert the trend figures into -ve integers and use this to identify it as 'Expense' type. The problem with this is that it is impossible to compare the visual trends side by side. Instead, the comparison is known after subtracting 'Expense' and 'Income' and see which type is higher. Images provided below are attached to provide a clear illustration of the plotting difference and how an instant comparison of the value cannot be achieved.
The desired plot should be as in image1.
Can anyone help with this? Please have a look at the image attached for a more clear picture.
In LineTooltipItem() widget we can provide a List of TextSpan as children. It can be customised.