public renderSelection()

in src/behavior.ts [100:117]


    public renderSelection(hasSelection: boolean): void {
        const {
            selection,
            interactivityService,
        } = this.options;

        const hasHighlights: boolean = interactivityService.hasSelection();

        selection.style("opacity", (dataPoint: HierarchyRectangularNode<SunburstDataPoint>) => {
            const { selected, highlight } = dataPoint.data;
            return getFillOpacity(
                selected,
                highlight,
                !highlight && hasSelection,
                !selected && hasHighlights
            );
        });
    }