Hi Luis,
Greetings from Syncfusion.
We have analyzed your query, and we can achieve your scenario by using the pointColorMapper function in LineSeries and placed a simple logic into it, which return the appropriate positive and negative color for each input data point. However when a point is connected from negative to positive, that will be in red colored and from positive to negative, that will be in green colored. We have created a simple sample, code snippet, and output image below, which meet your requirement. So, find that sample and revert back If you have any concerns regarding this scenario.
Code snippet –
|
pointColorMapper: (ChartSampleData sales, _) {
if (sales.y < 0) {
return Color.fromRGBO(255, 0, 0, 1);
} else {
return Color.fromRGBO(0, 255, 0, 1);
}
} |
Output image –
Thanks,
Arun