bkrem / react-d3-tree

:deciduous_tree: React component to create interactive D3 tree graphs
https://bkrem.github.io/react-d3-tree
MIT License
1.08k stars 269 forks source link

Individual Node Styling in V3 #426

Open jakubprogramming opened 1 year ago

jakubprogramming commented 1 year ago

I would like to know if and how it may be possible to apply different styles to individual nodes in my tree. I am using version 3.4.2.

It seems this was possible in V1, at least according to the documentation (https://github.com/bkrem/react-d3-tree/tree/v1).

    const myTreeData = [
      {
        name: 'Parent Node',
        attributes: {
          keyA: 'val A',
          keyB: 'val B',
          keyC: 'val C',
        },
        nodeSvgShape: {
          shape: 'circle',
          shapeProps: {
            r: 10,
            fill: 'blue',
          },
        },
    ...
    }

Is it still possible somehow? I can't find anything in the current v3 docs and neither can I find any examples.

Thanks for your help!