arlas-d3 / Exports / DonutUtils

Class: DonutUtils

Table of contents

Constructors

Methods

Constructors

constructor

new DonutUtils()

Methods

getNode

Static getNode(nodePath, donutNodes): DonutNode

Parameters

Name Type
nodePath SimpleNode[]
donutNodes any[]

Returns

DonutNode

Defined in

src/donuts/utils/DonutUtils.ts:83


getNodeColor

Static getNodeColor(d, donutNodeColorizer, keysToColors, colorsSaturationWeight): string

Parameters

Name Type
d DonutNode
donutNodeColorizer ColorGenerator
keysToColors [string, string][]
colorsSaturationWeight number

Returns

string

Defined in

src/donuts/utils/DonutUtils.ts:116


getNodePathAsArray

Static getNodePathAsArray(n): { fieldName: string ; fieldValue: string }[]

Parameters

Name Type
n DonutNode

Returns

{ fieldName: string ; fieldValue: string }[]

Defined in

src/donuts/utils/DonutUtils.ts:129


getNodePathAsString

Static getNodePathAsString(n): string

Parameters

Name Type
n DonutNode

Returns

string

Defined in

src/donuts/utils/DonutUtils.ts:176


getNodeToolipAsArray

Static getNodeToolipAsArray(n, donutNodeColorizer, keysToColors, colorsSaturationWeight): DonutTooltipContent[]

Parameters

Name Type
n DonutNode
donutNodeColorizer ColorGenerator
keysToColors [string, string][]
colorsSaturationWeight number

Returns

DonutTooltipContent[]

Defined in

src/donuts/utils/DonutUtils.ts:143