In Flutter Cartesian Chart widget, you can apply gradient for the chart series and rotate the gradient rendering angle with the help of the gradient property of the chart series. This property can be set using the LinearGradient constructor, which holds the gradient colors list for the series, stops values list for the gradient colors, begin and end alignment geometry for the gradient colors and also transform values for transforming the gradient shader for the series.
In Cartesian charts, there are two ways in which you can rotate the gradient colors of the chart series.
- By using the begin and end alignment properties of the LinearGradient.
- By using the transform property of the LinearGradient.
Documentation: https://help.syncfusion.com/flutter/cartesian-charts/series-customization#gradient-fill
To run this application, you need to first clone or download the ‘gradient rotation flutter chart’ repository and open it in your preferred IDE. Then, build and run your project to view the output.
For more help, check the Syncfusion Flutter documentation, or Flutter documentation.