dagre-d3

dagre-d3 IE workaround for SVG foreignObject element?

空扰寡人 提交于 2019-12-04 00:44:05
I'm an undergrad co-op and am currently developing a webpage project for my team. In the beginning, I chose to use dagre-d3 library to construct graphs, and they work fine on Chrome. Then I realize that ForeignObject element in SVG doesn't work on IE (which happens to be the primary browser to support). Since my goal is essentially to populate HTML content in each graph component, I was wondering if there was any workaround to implement this on IE still using dagre-d3. Or any recommendations for a different graph library? UPDATE: Essentially I wanted to create graph shown in the screenshot

Directed acyclic graph using d3.js without DOT

你离开我真会死。 提交于 2019-12-03 03:25:20
问题 I am trying to draw directed acyclic graph using d3.js. While searching for the layout, I came across Dagre but it seems to be of less use as I do not want to use DOT based code anywhere. If anyone knows about pure Javascript solution for this or plugin/custom layout for DAG, please let me know. Thanks in advance. 回答1: Dagre author here. Dagre doesn't include any of the graphviz code - it is pure JavaScript. It is based on similar layout techniques though; both are based on techniques from

Resizing d3 / dagre-d3 svg to show all contents

China☆狼群 提交于 2019-11-30 09:10:25
I'm trying to create DAGs with dagre-d3 . The data for these DAGs comes from a database, are different for each DAG and as such, I do not know the width/height to give the containing svg before adding all nodes and edges to the graph. So ideally I'd call something like d3.select("#svg1").resize_to_match_contents() after adding all nodes and edges to make sure all nodes are visible and the svg isn't too large. Of course there is no such function, and I have no idea how to implement it. I know I can call d3.select("#svg1").attr("height", "10") to set the height, but have no idea how to retreive