microsoft / powerbi-visuals-sunburst

Sunburst is a multilevel donut chart, used to visualize hierarchical data, depicted by concentric circles.
Other
39 stars 49 forks source link

Top category color - Possibility to set a default values for all categories #40

Open engpimo opened 5 years ago

engpimo commented 5 years ago

Hi, I'm using this visual: very nice.

The only strange thing: outer empty/blank circles are colored with the same color or can be specified using "Top category color", but I would like to set them always to a default color or to remove them, see attached image. Is it possible? Capture

helen508light commented 5 years ago

The empty/blank circles related to empty/nullable data items. Now it is standart behavior,but your suggestions really make sense. We'll add it in our backlog

minduse commented 2 years ago

Any update to this one or perhaps a pointer on where to start? This type of visualization is very powerful with org design to identify spans & layers.

minduse commented 2 years ago

If anyone is looking for a workaround for this you can do the following:

Around line 590 in Sunburst.ts change it to the following: if (originParentNode.children && originParentNode.children.length > 0) { for (const child of originParentNode.children) { let nodeColor:string; if (child.value != null) { nodeColor = this.getColor( Sunburst.LegendPropertyIdentifier, newDataPointNode.color, child.objects, name ); } else { nodeColor = "white"; }

To remove the tooltips on elements not displayed, around line 619 change it to this:

if (name.toString() != "") { newDataPointNode.tooltipInfo = this.getTooltipData( formatter, name, newDataPointNode.total ); }