Comments (10)
Wow, so awesome use case!Give me some moments to comprehand your scenario
from orgchart.
Sorry was in a hurry when i posted this ;) it is a interesting use case that i have spent quite a bit of time on myself.
As i don't have a clear vision of where you intend to take your project in the future i did not feel i should be the one to make changes that would ultimately change your library to only fit my needs.
The code above forms part of a database call via json return that i use to populate not a org chart as much but a node based diagram for my wireless systems performance at home( i can see the activity on my nodes in the house ... looks cool haha)
from orgchart.
Sorry @reappergrimd , going through all your code snippets and descriptions, I still can't get your point. I guess that maybe you just want embed svg into the nodes of orgchart, right?
from orgchart.
Morning , Basically yes , the code works perfectly in a chrome environment and the svg is embedded but not in IE.
from orgchart.
Hi @reappergrimd , is the following picture what you want?
from orgchart.
Hi , sorry for the delay. in essence that is exactly the view i would like in IE.
"It's like you can read my mind :) )
from orgchart.
Hello.In fact, through my testing , I got the similar snapshot in IE 9/10/11, just there is a bit difference in fonts.
from orgchart.
Would you mind sharing your code you used to accomplish this, i want to make sure i haven't messed up somewhere :)
from orgchart.
I just append the img composed of svg to the root node.
$('#chart-container').orgchart({
'data' : datascource,
'depth': 2,
'nodeContent': 'title'
});
var data = '<svg width="400px" height="200px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
'<title> designation</title>' +
'<g id="columnGroup">' +
'<rect x="65" y="10" width="75" height="110" fill="gainsboro"/>' +
' <text x="0" y="30" font-size="18px" font-weight="bold" fill="crimson">' +
'<tspan x="0" dy="1.5em"> test 0 </tspan>' +
'<tspan x="0" dy="1em"> test 1 </tspan>' +
'<tspan x="0" dy="1em"> test 2</tspan>' +
'</text>' +
'<text x="250" y="30" font-size="18px" text-anchor="middle">' +
'<tspan x="250" font-weight="bold" fill="crimson">Actual</tspan>' +
'<tspan x="250" dy="1.5em"> 7 </tspan>' +
'<tspan x="250" dy="1em"> 8 </tspan>' +
'<tspan x="250" dy="1em"> 3 </tspan>' +
'</text>' +
'<text x="350" y="30" font-size="18px" text-anchor="middle">' +
'<tspan x="350" font-weight="bold" fill="crimson">Plan</tspan>' +
'<tspan x="350" dy="1.5em"> 8 </tspan>' +
'<tspan x="350" dy="1em"> 8 </tspan>' +
'<tspan x="350" dy="1em"> 2 </tspan>' +
'</text>' +
'</g>' +
'</svg>';
var img = new Image();
var DOMURL = window.URL || window.webkitURL || self;
var svg = new Blob([data], { type: 'image/svg+xml;charset=utf-8' });
var url = DOMURL.createObjectURL(svg);
var img = document.createElement("img");
img.src = url;
img.height = 130;
$('.content:first').html(img);
from orgchart.
In fact, I am also interested to know why you build up common table with svg rather than
, ,from orgchart.
Related Issues (20)
- [feature request] Structure for genealogy/pedigree/family tree HOT 3
- 兄弟关系可不可以连线 HOT 1
- Partner Feature
- Regression: Drag and Drop is not functional in the demo page HOT 4
- Bug : Nodes overlapping when width increased
- Update the react version to have hybrid charts
- title and content in <ul> <li> HOT 1
- in content display html content HOT 1
- How to use a node only once? HOT 3
- Wrong line drawing when using text-center: left; HOT 1
- 如何通过参数设置隐藏兄弟节点 HOT 1
- 请问大佬data-prop-compact.html这个demo是不是有异常 HOT 3
- not able export chart in png roper
- ajaxURL HOT 2
- Sort siblings HOT 1
- orgchart with nodes of different widths don't work HOT 1
- drag & drop the nodes of orgchart don't work
- multiple-layers chart don't work HOT 1
- specific children of a certain branch of the chart to be displayed as vertical. the possibility to set VerticalLevel by data don't work. HOT 1
- I want to using 'compact' and 'verticalLevel' option together.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orgchart.