I am currently learning Javascript and Cytoscape.JS, and I am attempting to implement a discrete color mapping for my nodes based on a specific property in my data. This property consists of five unique values (a, b, c, d, e), and I want to assign colors to the nodes based on their respective groups.
My queries are:
- Can colors be automatically generated based on the number of unique values (in this case 5)?
- How can I assign these colors to all nodes?
I hope this explanation is clear. Lazloo