We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HI,
I was trying to override the onClick event for the sunburst chart but upon calling the focusOnNode function I get this error:
focusOnNode is not defined
the snippet:
var systems = Sunburst() .data(types) .width(700) .height(800) //.minSliceAngle(.4) .size('size') .color((function (d, node) {
if (d.hasOwnProperty('color') && d.color != 'none') { return d.color; } else{ return color(d.name) } })) .radiusScaleExponent(1) .excludeRoot(true) .maxLevels(2) .showLabels(true) .label((function (d) { if (d.hasOwnProperty('size') && d.size != null) { return d.name+": "+d.size; } else{ return d.name; } })) .onClick(node => { this.focusOnNode(node); // do other operations with node }) .tooltipContent((d, node) => `Assets: <i>${node.value}</i>`) (document.getElementById('system'));
Thank you for your help
The text was updated successfully, but these errors were encountered:
@rjortiguero most likely you'd want to call focusOnNode on your sunburst instance variable, not on this. So
focusOnNode
this
systems.focusOnNode(node)
instead of
this.focusOnNode(node);
Sorry, something went wrong.
It still shows focusOnNode is not a function
No branches or pull requests
HI,
I was trying to override the onClick event for the sunburst chart but upon calling the focusOnNode function I get this error:
focusOnNode is not defined
the snippet:
var systems = Sunburst()
.data(types)
.width(700)
.height(800)
//.minSliceAngle(.4)
.size('size')
.color((function (d, node) {
Thank you for your help
The text was updated successfully, but these errors were encountered: