Comments (8)
Hi, fvlima, you tried the example -- ondemand-loading-data and got this bug ?
from orgchart.
I'm using the ajax datasource example. And I guess that is the point because theren't no more parents for a determined node, and the arrow is showed to perform a click to load more data. See my code:
$('#id).orgchart({ 'data': '../url/' + id, 'nodeRelationship': 'level', 'nodeTitle': 'relationship', 'nodeChildren': 'parents', 'nodeContent': 'identification', 'parentNodeSymbol': '', 'nodeID': 'id', 'depth': 4, 'createNode': function ($node, data) { if (data['img'] != undefined) { var miniature = $('<i>', { 'class': 'fa fa-info-circle second-menu-icon', click: function () { $(this).siblings('.second-menu').toggle(); } }); var img = '<div class="second-menu">' + '<img class="avatar" src="/media/' + data['img'] + '"></div>'; $node.append(miniature).append(img); } } });
I know that the error refers to opts.ajaxURL, because it doesn't defined, but I chose to not load data on demand, only a initial ajax request that brings me all nodes showing only the first four nodes.
from orgchart.
Hi, fvlima. Does your returned json datasource contain corrent property "level", it's value should be "110" or "111". The three numbers indicate that whether the node has parent node, sibling node or child node.
from orgchart.
You know, wrong indicator numbers will result in wrong arrows, and wrong arrows will mislead users to load non-existing nodes.
from orgchart.
Hi. I need to ask apologies for my mistake. I thought that if a node had no children, then the orgchart would ignore automatically these empty children nodes. Maybe it can be developed to prevent situations like mine, because were not defined urls to load data on demand.
from orgchart.
Hi, fvlima, I got your point, I admit that in most cases, the indicator number is unnecessary except ondemand loading scenario, because in this scenario, orgchart needs some signal to load unknown nodes and in other scenarios, orgchart loads all nodes all at once, orgchart should be capable of generate the right collapsing/expanding arrows according the fixed hierarchy. I'll refine the code as soon as possible.
from orgchart.
The idea -- I thought that if a node had no children, then the orgchart would ignore automatically these empty children nodes, has come true in version 0.9.9.7 of orgchart.
from orgchart.
Hi, fvlima, you tried the example -- ondemand-loading-data and got this bug ?
yes
from orgchart.
Related Issues (20)
- 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.
- Option to see that nodes have relations (parent/son/sibling) although they may not be visible without hovering over nodes individually HOT 2
- If you call oc.init(...) multiple times, some values are not reset resulting in unexpected behavior.
- Combining collapsed and hybrid modes
- options.compact() does not prevail over data.compact (as documented)
- Copying and pasting a CDN link directly can result in errors.
- 为增加兄弟节点函数增加指定增加到右边的参数选项
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.