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.

About the way to add the labels attribute

See original GitHub issue

Version:^2.0.0-alpha.9

config: {
  containerId: ...,
  neo4j: ...,
  visConfig: ...,
  labels: {
    Product: {
      label: "name",
      [NeoVis.NEOVIS_ADVANCED_CONFIG]: {
        function: {
          title: (props) => NeoVis.objectToTitleHtml(props),
        },
      static: {
        font: {
          size: 18,
          color: "#000",
          background: "none",
        },
        borderWidth: 2,
        borderWidthSelected: 2,
        color: {
          border: "#c0a378",
          background: "#d9c8ae",
          highlight: {
            border: "#c0a378",
          },
        },
      },
    },
    Verson: {
      ...
    },
    ...
  },
}

As shown in the code, I manually configured more than ten labels attribute names such as Product and Version (in the future, these names may change), but this makes the code quite redundant.

Is there any other way to get all the labels names at once, so that I can automatically generate these codes through the mechanism of function passing parameters, thank you

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
royhuang813commented, Nov 5, 2021

Remember that neo4j desktop have an auto connect between the nodes, so even if the cypher didn’t return any relationship if 2 nodes have a relationship neo4j desktop will auto pull them, while neovis only shows exactly what gets pulled

Try disabling that in the neo4j desktop and check if that return the same thing

After testing, it is really because of the automatic connection of neo4j that the display is inconsistent with neovis thanks a lot!

0reactions
SLMsunrisecommented, Nov 5, 2021

thanks you

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Label element - HTML: HyperText Markup Language | MDN
To explicitly associate a <label> element with an <input> element, you first need to add the id attribute to the <input> element.
Read more >
HTML <label> for Attribute - GeeksforGeeks
The HTML <label> for Attribute is used to specify the type of form element a label is bound to. ... Attribute Values: It...
Read more >
HTML label tag - W3Schools
Definition and Usage. The <label> tag defines a label for several elements: · Tips and Notes. Tip: The for attribute of <label> must...
Read more >
Linking Labels to Attributes
To link a label to an attribute control using the source code, from the Tools menu, click Source code. In the Source code...
Read more >
Labeling Controls | Web Accessibility Initiative (WAI) - W3C
The label of a <button> element is set inside the element and can include markup. This allows more advanced accessibility hints to be...
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