cheminfo / nmrium

React component to display and process nuclear magnetic resonance (NMR) spectra.
https://docs.nmrium.org
MIT License
48 stars 24 forks source link

Recolor by distinct value not working as expected ? #3075

Closed lpatiny closed 1 month ago

lpatiny commented 1 month ago

2024-06-04 08 13 17

I would expect that when I use the name column all the spectra have different colors.

hamed-musallam commented 1 month ago

we discussed this before, it takes the first spectrum color in the group and uses it for the other spectra in the group, in your case, when you recolor based on the pulse, we have only one color. you have to reset the coloring before recoloring it again

image

lpatiny commented 1 month ago

You are right, but I forgot about it, and Andres was also confused.

It is probably not intuitive.

I think if we select this recolor function, each group must have a different color. So, if the first spectrum of each group has a different color, we can keep it. Otherwise, we need to find a new not yet used color.

I think this would meet the user expectations.