kandi X-RAY | hsite Summary
kandi X-RAY | hsite Summary
hsite
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hsite
hsite Key Features
hsite Examples and Code Snippets
Community Discussions
Trending Discussions on hsite
QUESTION
I have tried searching for an answer to this problem but have not been able to find anything that defines my problem.
I have created an Interactive Tree Diagram Menu for my Sharepoint site using D3.js and HTML (Code Below)
In Codepen it works fine and I can adjust the width and length of the SVG using the width and length variables:
...ANSWER
Answered 2018-Dec-26 at 21:31Have you tried setting the svg width and height attributes to 100%, and then set the width/height of the containing div (not the iframe)? This seems to provide consistent results for me. For example, I changed your JS to: var svg = d3.select("#Menu").append("svg").attr("width", "100%").attr("height", "100%").append("g").attr("transform", "translate("+ margin.left + "," + margin.top + ")"); and added #Menu { width: 960px; height: 300px; } to your styles. – odin243 Dec 21 at 21:25
This worked a treat
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hsite
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page