fl_chart
fl_chart copied to clipboard
Please, add gradient colours for the line depending on Y value for the LineChart (for example if y > 10 I need to set one color for the line, if y > 100 it should be another color)
I mean to have something like that, when the color of the line depends on the y value of the spot
not sure what you mean. Could adding Stops to your gradient solve your problem? You could use them to define hard edges. https://css-tricks.com/books/greatest-css-tricks/hard-stop-gradients/
Yes, you can add stops to your gradient to achieve the result.
Check the LinearGradient and stops property. You can use it in the gradient property of LineChartBarData