pygraphistry icon indicating copy to clipboard operation
pygraphistry copied to clipboard

[FEA] Control the nodes and relationship properties displayed in the graphistry graphs

Open Parth-Joshi-6669 opened this issue 2 years ago • 1 comments

Request to include a function which filters all properties of a node or a relationship, where we just mention the property name and only those mentioned in the function are displayed when the graphs are shown.

image Taking this image as an example Mentioning - "Color" "id" "name"

Would only show those specific 3 properties in the output when the particular node is selected. If there are nodes with different labels and properties, we can also mention the required properties for specific labeled node. Default value is showing all properties

Parth-Joshi-6669 avatar Dec 27 '21 12:12 Parth-Joshi-6669

Thanks again @Parth-Joshi-6669 !

We have some internal APIs and heuristics here that may make sense to expose. Your point about the ability to support type-based selection makes sense, and we have had other folks ask about this.

Maybe something like:

  • hide null values (default on): null, NaN, ...
  • include/exclude property lists
    • global, node, edge, type hierarchy
    • unclear: when multiple matches, including along the hierarchy, which include/exclude to use
    • ... -- most specific, concatenation? both include+exclude?
{
  "hideNull": true,
  "exclude": ["degree", "degreeIn", "source", "destination", "id"],
  "node": {
     "exclude": ["degree"],
     "type": {
         "field": "manufacturer",
         "value": "tesla",
         "include": {"id", "manufacturer"], 
         "type": {
            "field": "model",
            "value": "T",
            "include": ["generation"],
            "exclude": ["mpg"]

lmeyerov avatar Dec 27 '21 18:12 lmeyerov