48bits
48bits

Reputation: 15

How to assign specific colors to each datagroup in Gremlin?

%%gremlin -g Datagroup

Currently, I have my vertex colored and grouped via a 'datagroup' property. Is there a way to assign specific colors to each datagroup(property) in AWS Neptune gremlin?

Upvotes: 1

Views: 352

Answers (1)

Kelvin Lawrence
Kelvin Lawrence

Reputation: 14371

You can have different colors, or even icons for the nodes, assigned. There are examples in the sample notebooks that are part of the graph-notebook project. For example if you look in the /Neptune/02-Visualization/Grouping-and-Appearance-Customization-Gremlin notebook, you will see this example:

%%graph_notebook_vis_options
{
  "groups": {
      "['CA']": {"color": "red"},
      "['MX']": {"color": "rgba(9, 104, 178, 1)"},      
      "['US']": {"color": "#00FF00"}
    }
}

Followed by

%%gremlin -p v,inv -g country
g.V().hasLabel('airport').has('code','CZM').out('route').path().by(valueMap())

There are additional examples in the /Neptune/02-Visualization/Air-Routes-Gremlin notebook.

Upvotes: 1

Related Questions