vis: add `useColorProvider` hook to manage what colors are being assigned to which nodes
Closed this issue · 3 comments
dyc3 commented
Is your feature request related to a problem? Please describe.
We need to globally manage color assignments in visualizations so that we can render a legend (#1427)
Describe the solution you'd like
add a useColorProvider
hook that provides a color
function to assign colors to things (for use in views), and a Map that contains all the colors that have been assigned and to what (for use in the legend)
Additional context
No response
Victor-M-Giraldo commented
I would like to work on this
Victor-M-Giraldo commented
Also giving an update here. Definitely a bit stumped. Wrapping my head around the idea of hooks is weird. Reading through the react docs though and I'll hopefully have made some progress for Tuesday.