fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

Manage z-index for Scatter Chart

Open vbaulac opened this issue 1 year ago • 3 comments

Hi.

It would be very nice to be able to manage a z-index in the Scatter plot. I have a lot of point in my scatter plot, and they do not have the same color. And some are more important than others. I'd like them to be on front, so they are not hidden by others.

Current hack would probably be to change the order of the array of my Spots, but it is an hack.

Having a z-index property, CSS-style, would be super.

Thanks for this awesome lib !

Victor

vbaulac avatar Jan 10 '24 16:01 vbaulac

Hi @vbaulac , Did you found any solution?

hareendranmg avatar Jul 16 '24 09:07 hareendranmg

It's a good starting point for contributing, you can just read the guideline and open your PR. We can add a property (for example called renderPriority which is null by default) here: https://github.com/imaNNeo/fl_chart/blob/11d13a78e6a134aa0cfdcd8dfa88dceaf79a4033/lib/src/chart/scatter_chart/scatter_chart_data.dart#L189-L204

Then when rendering it, you can sort them by the renderPriority if any point has this property.

imaNNeo avatar Jul 19 '24 19:07 imaNNeo

I can take this if you'd like!

mitulagr2 avatar Oct 13 '24 16:10 mitulagr2

I can take this if you'd like!

Yes, that would be nice!

imaNNeo avatar Oct 20 '24 18:10 imaNNeo

This feature has just been added in 0.70.1. Please take a look!

imaNNeo avatar Jan 06 '25 21:01 imaNNeo