Custom layers on Sunburst chart?
fralik opened this issue · 0 comments
fralik commented
I see in documentation that Nivo Sunburst supports custom layers via it's layers
property. However, I do not understand what can be provided as a custom layer. I see that it may be a function, so I made one. However, attempting to return a string from it or an object, results in exception.
def custom_layer(obj):
nodes = obj['nodes']
centerX = obj['centerX']
centerY = obj['centerY']
print(f"centerX: {centerX}, centerY: {centerY}")
return html.div("custom_layer")
nivo.Sunburst(data=DATA, enableArcLabels=True, arcLabel="id", layers=["arcs", 'arcLabels', custom_layer])
It throws an non-identifiable exception since react is minified.