Skip to content

When graph is under a Jquery DataTable with dynamic height, labels don't work #55

@InevitableAmbrosia

Description

@InevitableAmbrosia

I have a website using your code at https://propagate.info/#source?uuid=7c4d14f0-e749-11ef-9b29-89ed0fcd27c8. I want to move the graph to the bottom of the DataTable, but when I move it and use the adjusted height of the partial under the header as the height(param), labels work while the graph is rendering and nodes are moving, but they stop working once the graph finishes processing. Any ideas about this? The graph is in a div container with position relative, and the adjusted height. Here is my graph code:
`
function graphRender(selector){
const Graph = new ForceGraphVR(document.getElementById(selector)).graphData(gData)
.nodeVal(node=>{
if(node.group === "Find!"){
return 128;
}
})
.nodeThreeObject(
function (node) {

                   // Create text node
                   const nodeSpriteText = new SpriteText(node.name);
                   nodeSpriteText.fontSize = 18;
                   nodeSpriteText.color = node.color;
                   //nodeSpriteText.opacity = 0.75;
                   nodeSpriteText.textHeight = 7;
                   //nodeSpriteText.position.y = -14;// Move to the bottom


                   return nodeSpriteText;
                 }
              )
      .linkOpacity(.1)
      .onNodeClick(function(node){
        		switch(node.group){
	        		case "Source":
	        			ANCHOR.route("#source?uuid="+node.id)
	        			break;
	        		case "Author":
	        			ANCHOR.route("#author?uuid="+node.id)
	        			break;
	        		case "Class":
	        			ANCHOR.route("#class?uuid="+node.id)
	        			break;
	        		case "Publisher":
	        			ANCHOR.route("#publisher?publisher="+encodeURIComponent(node.id))

	        			break;
	        	}
	        }).height($("ANCHOR_partial").height()).width($(window).width() - 55);

}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions