Node SVG not displaying after customization
- Dominant language
- JavaScript
- Stars
- 3.9k
- Forks
- 418
- PR merge metrics
- No merged PRs in 30d
Description
I was trying to follow the example codes to customize the node appearance.
I have following code:
```javascript
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:

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

Behind Viva.Graph.svg("rect") is a valid object.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the example with Viva.Graph.View.webglGraphics(), graphics.node(), Viva.Graph.svg("rect"), and renderer.run(). Trace how the customized SVG node is handled by the WebGL graphics path; done means customized rectangular nodes render in graphDiv while links still display.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100