fl_chart icon indicating copy to clipboard operation
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)

Open MishaPadalka opened this issue 1 year ago • 1 comments

image

I mean to have something like that, when the color of the line depends on the y value of the spot

MishaPadalka avatar Jun 22 '24 12:06 MishaPadalka

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/

Tobbyte avatar Jun 30 '24 05:06 Tobbyte

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

imaNNeo avatar Jul 19 '24 21:07 imaNNeo