![]() ![]() If a certain node has children, a childrenDropLevel can be defined on it. Suffix "-copy" is added to the id of the node element. In that case, an element with a given id is found and its copy is used as node structure. A HTML string needs to be specified in order for this to work.Īnother usage of this property is to pass a jQuery ID selector. The is inserted before the text properties.Ī custom HTML structure can be inserted into a node container. A relative or absolute path to target image needs to be set as image parameter. By defining a link property, a node is rendered as an element instead.Īn image can be inserted into a node container. ![]() If you pass an object instead off a string, an tag will be created instead of tag.īy default, each node is created as an absolute positioned element. Corresponding HTML classes will be given to each created tag so they can be styled what ever way you like. ![]() For each text property a tag will be created inside the node container. Here you can describe the content of a node in detail. Var chart = new Treant(simple_chart_config, function() class: -Ī text property can be given to each node. The documentation details where jQuery comes into play.Īn example of the complete constructor with a test callback and jQuery. Providing jQuery to Treant extends the functionality and internalĮfficiencies of the library. The last parameter is also optional and should be the jQuery instance ($) if available. The second is an optional callback function that is executed as soon as the tree is rendered and ready to be used. The first is the configuration object (required), which is later described in detail. The constructor of Treant can take 3 possible parameter. Var my_chart = new Treant(simple_chart_config) The initialization of the Treant library is performed by inserting a simple HTML and JavaScript snippet on your website: In the following article, a simple example is given for presentation purposes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |