'Dagre-d3 How to show additional information beside nodes?

I want to show some additional information beside nodes drawn by dagre-d3. And my solution is to create a parent node and add info to its label. But the label is blocked by the child node. By the way, I tried to round the corner of the parent node and it's useless. Any solutions?

        mynodes.forEach((item, index) => {
        let start_time = stamp2date(event_result[id2event[item.id-1]][1].start_time);
        let end_time = stamp2date(event_result[id2event[item.id-1]][1].end_time)
        if (event_result[id2event[item.id-1]][1].final_result === 'Happen') {
            g.setNode(item.id-1, {label: item.name, style: 'fill: #afa'});                
        }
        else {
            g.setNode(item.id-1, {label: item.name, style: 'fill: gray'});
        }

        let gn = 'time_'+(item.id-1);
        g.setNode(gn, {label: start_time+'\n'+end_time, style: 'fill: white', clusterLabelPos:'bottom', rx: 5, ry: 5});
        g.setParent(item.id-1, gn);
    });

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source