Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node SVG not displaying after customization #284

Open
arne-fuchs opened this issue Feb 5, 2025 · 0 comments
Open

Node SVG not displaying after customization #284

arne-fuchs opened this issue Feb 5, 2025 · 0 comments

Comments

@arne-fuchs
Copy link

arne-fuchs commented Feb 5, 2025

I was trying to follow the example codes to customize the node appearance.
I have following code:

    var graphics = Viva.Graph.View.webglGraphics();
    graphics.node(function(node) {
        console.log(node.id);
        return Viva.Graph.svg("rect")
            .attr("width", 10)
            .attr("height", 10)
            .attr("fill", "#00a2e8");
    });

    // specify where it should be rendered:
    var renderer = Viva.Graph.View.renderer(graph, {
        container: document.getElementById('graphDiv'),
        layout : layout,
        graphics: graphics,
        renderLinks : true
    });
    renderer.run();

and nodes disappear:

Image

Removing graphics.node(... reveals the nodes again:

Image

Behind Viva.Graph.svg("rect") is a valid object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant