Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Setting color on individual nodes in Tree
posted

I am binding to a igTree using JSON binding.  I would like to set different colors on individual nodes.  For example, the first node is red, the second is blue, the third is green etc.  The color is used to indicate a status for the data the node represents.  Can someone give me an idea of how to do this, or if it can be done?

Parents
  • 775
    posted

    Hello Bill,

        Yes, such functionality is possible. One way of achieving it is by adding the custom logic in the "rednered" event. For any particular case the logic will be different, but basically you just need to find each node by a certain selector and paint it's "background" property with the value you desire. You can refer to the attached sample to understand how exactly that should be done. You just need to specify the "js" and "css" paths to the source files.

    If you have any additional questions, please don't hesitate to ask.

    Thanks,

    Martin Stoev

    igTreeCase.zip
Reply Children