How to assign specific colors to each datagroup in Gremlin?

286 Views Asked by At
%%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?

1

There are 1 best solutions below

0
On BEST ANSWER

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.