question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Customize Node Caption

See original GitHub issue

I need to customize the caption of a node, which should be the first element of a list and the list is from a property of the node. The function I write is to pass a node and return the element.

function getNodeCaption(node){ 
    const names = node["Name"]; 
    // console.log("names type",typeof(names)) 
    return names[0];
}

And I set the caption of the node label to be caption: getNodeCaption in the config. When I print the type of the list, I get undefined. I wonder whether there is an example showing how to use a function to customize node caption. Thank you.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
SandyLuXYcommented, Oct 30, 2021

Success! Thank you so much 😃

0reactions
SandyLuXYcommented, Nov 7, 2021

node is an object, Name is a key of the object. node["Name"] is the values in the object whose keys are "Name".

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Do I Change Caption (Node/Interface/Volume) Via API
Hello Thwack Community,. I'm looking for how to update the caption of an entity (nodes, interfaces, and volumnes, etc) via the API.
Read more >
Neo4j - set node captions to labels in web interface
There is a way to use a node label as a caption in the neo4j browser, but there is a caveat (see below)....
Read more >
Default caption for a node in Neo4j Desktop
I want to use the CREATE statement and create the node. The node will display the caption using the property which I assigned...
Read more >
Assign Pods to Nodes - Kubernetes
Assign Pods to Nodes. This page shows how to assign a Kubernetes Pod to a particular node in a Kubernetes cluster.
Read more >
Possible to dynamically update a node's label?
The docs hint that labels might not be evaluated often enough to allow for example a message event handler ( node.on('input', ) to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found