amcharts5 icon indicating copy to clipboard operation
amcharts5 copied to clipboard

Can we access the sunburst levels in amcharts 5 as we can access in amcharts 4

Open shanqq opened this issue 1 year ago • 6 comments

I am trying to find the method that can give me the each level node of sunburst. particular i want each level node as separate variable. i tried finding it but was not able to find. in amcharts 4 i can find that but not in amcharts 5

shanqq avatar Jul 22 '22 05:07 shanqq

Just to make sure: you need get nodes in specific level OR you need to get specific node in a level OR you need to get level of the node?

martynasma avatar Jul 24 '22 09:07 martynasma

i need to disable hover effect on specific nodes

shanqq avatar Jul 24 '22 19:07 shanqq

How do you identify which nodes to disable hover on?

Do you disable hover effect on all nodes of some level? Or individual nodes within one level?

If you had a working CodePen on how it is implemented in amCharts 4, I'd be asking less questions ;)

martynasma avatar Jul 25 '22 05:07 martynasma

i just need to access nodes if i got three children of root node. like in amcharts 4 how we access levels.

shanqq avatar Jul 25 '22 07:07 shanqq

Thanks.

You can iterate through series' nodes and collect required ones based on their "depth":

var level1nodes = [];
series.nodes.each(function(node) {
  if (node.dataItem.get("depth") == 1) {
    level1nodes.push(node);
  }
});
console.log(level1nodes);

martynasma avatar Jul 25 '22 08:07 martynasma

thanks alot

shanqq avatar Jul 25 '22 11:07 shanqq

This issue is stale because it has been open 30 days with no activity. It will be closed in 5 days unless a new comment is added.

github-actions[bot] avatar Aug 25 '22 00:08 github-actions[bot]

I want to make the hover off at specific node via level setting. can we do that right ?

On Sun, 24 Jul 2022 at 14:32, Martynas Majeris @.***> wrote:

Just to make sure: you need get nodes in specific level OR you need to get specific node in a level OR you need to get level of the node?

— Reply to this email directly, view it on GitHub https://github.com/amcharts/amcharts5/issues/500#issuecomment-1193276488, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJ6CZW5OF5AKHKXJ4UAAF3VVUBCNANCNFSM54KBZ64Q . You are receiving this because you authored the thread.Message ID: @.***>

shanqq avatar Oct 11 '22 08:10 shanqq