Skip to content

arlas-d3 / Exports / AbstractDonut

Class: AbstractDonut

Hierarchy

  • AbstractDonut

OneSelectionDonut

MultiSelectionDonut

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AbstractDonut()

Properties

arc

Protected arc: Arc<AbstractDonut, DefaultArcObject>

Defined in

src/donuts/AbstractDonut.ts:34


donutContext

Protected donutContext: Selection<SVGElement, TreeNode, BaseType, TreeNode>

Defined in

src/donuts/AbstractDonut.ts:31


donutDimensions

donutDimensions: DonutDimensions

Defined in

src/donuts/AbstractDonut.ts:30


donutParams

donutParams: DonutParams

Defined in

src/donuts/AbstractDonut.ts:29


donutTooltip

Protected donutTooltip: DonutTooltip

Defined in

src/donuts/AbstractDonut.ts:37


lastSelectedNode

Protected lastSelectedNode: DonutNode = null

Defined in

src/donuts/AbstractDonut.ts:33


x

Protected x: ScaleLinear<number, number, never>

Defined in

src/donuts/AbstractDonut.ts:35


y

Protected y: ScalePower<number, number, never>

Defined in

src/donuts/AbstractDonut.ts:36

Methods

addSelectedNode

Protected addSelectedNode(clickedNode): void

Description

Add the selected node to selectedArcsList

Parameters

Name Type Description
clickedNode DonutNode The selected node on the donut

Returns

void

Defined in

src/donuts/AbstractDonut.ts:160


createDonutArcs

Protected createDonutArcs(): void

Description

Creates donuts arcs

Returns

void

Defined in

src/donuts/AbstractDonut.ts:73


dataChange

Abstract dataChange(newData): void

Parameters

Name Type
newData TreeNode

Returns

void

Defined in

src/donuts/AbstractDonut.ts:65


deselectAll

Protected deselectAll(): void

Description

Set isSelected attribute to false for all the donut's nodes

Returns

void

Defined in

src/donuts/AbstractDonut.ts:253


hoverNode

Protected Abstract hoverNode(hoveredNode): any

Parameters

Name Type
hoveredNode DonutNode

Returns

any

Defined in

src/donuts/AbstractDonut.ts:377


initializeDonutDimensions

Protected initializeDonutDimensions(): void

Description

Inialize donuts dimensions

Returns

void

Defined in

src/donuts/AbstractDonut.ts:86


onClick

Protected Abstract onClick(event, clickedNode): void

Parameters

Name Type
event PointerEvent
clickedNode DonutNode

Returns

void

Defined in

src/donuts/AbstractDonut.ts:379


onMouseLeavesContext

Protected onMouseLeavesContext(): void

Returns

void

Defined in

src/donuts/AbstractDonut.ts:347


onMouseOut

Protected onMouseOut(): void

Returns

void

Defined in

src/donuts/AbstractDonut.ts:340


onMouseOver

Protected onMouseOver(event, hoveredNode): void

Parameters

Name Type
event MouseEvent
hoveredNode DonutNode

Returns

void

Defined in

src/donuts/AbstractDonut.ts:317


onSelectionChange

Abstract onSelectionChange(selectedArcsList): void

Parameters

Name Type
selectedArcsList SimpleNode[][]

Returns

void

Defined in

src/donuts/AbstractDonut.ts:66


plot

plot(): void

Description

Plots the donut

Returns

void

Defined in

src/donuts/AbstractDonut.ts:45


plotDonut

Protected plotDonut(): void

Description

Draws the donuts arcs

Returns

void

Defined in

src/donuts/AbstractDonut.ts:136


reapplySelection

Protected reapplySelection(): void

Description

Set isSelected attribute to true giving the selectedArcsList

Returns

void

Defined in

src/donuts/AbstractDonut.ts:262


removeAllSimilarNodesOfSameRing

Protected removeAllSimilarNodesOfSameRing(selectedArc): void

Description

REMOVES ALL THE NODES OF SAME RING HAVING THE SAME VALUE FROM THE SELECTEDARCSLIST,

Parameters

Name Type Description
selectedArc SimpleNode[] Path from the selected arc to the ultimate parent (as an array)

Returns

void

Defined in

src/donuts/AbstractDonut.ts:237


removeHigherNodes

Protected removeHigherNodes(clickedNode): void

Description

Removes from selectArcsList all the parent nodes of the clicked node that are selected

Parameters

Name Type Description
clickedNode DonutNode The selected/unselected node of the donut

Returns

void

Defined in

src/donuts/AbstractDonut.ts:198


removeSelectedNode

Protected removeSelectedNode(clickedNode): void

Description

Removes the selected node from selectedArcsList

Parameters

Name Type Description
clickedNode DonutNode The unselected node from the donut

Returns

void

Defined in

src/donuts/AbstractDonut.ts:178


removeUnExistingNodes

Protected removeUnExistingNodes(): void

Description

Removes the unexisting nodes in the donut from the selectedArcsList

Returns

void

Defined in

src/donuts/AbstractDonut.ts:221


resize

resize(donutContainer): void

Description

Resizes donut on window resize event.

Parameters

Name Type
donutContainer HTMLElement

Returns

void

Defined in

src/donuts/AbstractDonut.ts:58


setTooltipPosition

Protected setTooltipPosition(event): void

Parameters

Name Type
event any

Returns

void

Defined in

src/donuts/AbstractDonut.ts:359


showTooltip

Protected showTooltip(node): void

Parameters

Name Type
node DonutNode

Returns

void

Defined in

src/donuts/AbstractDonut.ts:351


structureDataToNodes

Protected structureDataToNodes(): void

Description

Transforms input data to d3 nodes

Returns

void

Defined in

src/donuts/AbstractDonut.ts:109


styleNodes

Protected styleNodes(): void

Description

Styles the nodes according to their states

Returns

void

Defined in

src/donuts/AbstractDonut.ts:274


tweenNode

Protected tweenNode(node, duration): void

Description

Apply animation after clicking on the node.

Parameters

Name Type Description
node DonutNode Clicked on node
duration number Duration of the animation

Returns

void

Defined in

src/donuts/AbstractDonut.ts:302


unhoverNodesButNotSelected

Protected Abstract unhoverNodesButNotSelected(): any

Returns

any

Defined in

src/donuts/AbstractDonut.ts:378