@unovis/ts 1.4.0-beta.3 → 1.4.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,8 @@ import { NestedDonutDirection, NestedDonutLayerSettings, NestedDonutSegment } fr
|
|
|
4
4
|
export interface NestedDonutConfigInterface<Datum> extends ComponentConfigInterface {
|
|
5
5
|
/** Diagram angle range. Default: `[0, 2 * Math.PI]` */
|
|
6
6
|
angleRange?: [number, number];
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Direction of hierarchy flow from root to leaf.
|
|
8
9
|
* `NestedDonutDirection.Inwards` starts from the outer most radius and works towards center
|
|
9
10
|
* `NestedDonutDirection.Outwards` starts from the inner most radius the consecutive layers outward.
|
|
10
11
|
* Default: `NestedDonutDirection.Inwards`
|
|
@@ -27,6 +28,14 @@ export interface NestedDonutConfigInterface<Datum> extends ComponentConfigInterf
|
|
|
27
28
|
sort?: (a: NestedDonutSegment<Datum>, b: NestedDonutSegment<Datum>) => number;
|
|
28
29
|
/** Array of accessor functions to defined the nested groups */
|
|
29
30
|
layers: StringAccessor<Datum>[];
|
|
31
|
+
/**
|
|
32
|
+
* Configuration properties for individual layers. Accepts an accessor or constant of type:
|
|
33
|
+
* {
|
|
34
|
+
* backgroundColor?: string;
|
|
35
|
+
* labelAlignment?: NestedDonutSegmentLabelAlignment;
|
|
36
|
+
* width?: number | string;
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
30
39
|
layerSettings?: GenericAccessor<NestedDonutLayerSettings, number>;
|
|
31
40
|
layerPadding?: number;
|
|
32
41
|
/** Corner Radius. Default: `0` */
|
|
@@ -41,10 +50,12 @@ export interface NestedDonutConfigInterface<Datum> extends ComponentConfigInterf
|
|
|
41
50
|
segmentLabel?: StringAccessor<NestedDonutSegment<Datum>>;
|
|
42
51
|
/** Color accessor function for segment labels */
|
|
43
52
|
segmentLabelColor?: ColorAccessor<NestedDonutSegment<Datum>>;
|
|
44
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* When true, the component will display empty segments (the ones that have `0` values) as tiny slices.
|
|
45
55
|
* Default: `false`
|
|
46
56
|
*/
|
|
47
57
|
showEmptySegments?: boolean;
|
|
58
|
+
/** Show labels for individual segments. Default: `true` */
|
|
48
59
|
showSegmentLabels?: boolean;
|
|
49
60
|
}
|
|
50
61
|
export declare const NestedDonutDefaultConfig: NestedDonutConfigInterface<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/nested-donut/config.ts"],"sourcesContent":["// Core\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, GenericAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { NestedDonutDirection, NestedDonutLayerSettings, NestedDonutSegment } from './types'\n\nexport interface NestedDonutConfigInterface<Datum> extends ComponentConfigInterface {\n /** Diagram angle range. Default: `[0, 2 * Math.PI]` */\n angleRange?: [number, number];\n
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/nested-donut/config.ts"],"sourcesContent":["// Core\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { ColorAccessor, GenericAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { NestedDonutDirection, NestedDonutLayerSettings, NestedDonutSegment } from './types'\n\nexport interface NestedDonutConfigInterface<Datum> extends ComponentConfigInterface {\n /** Diagram angle range. Default: `[0, 2 * Math.PI]` */\n angleRange?: [number, number];\n /**\n * Direction of hierarchy flow from root to leaf.\n * `NestedDonutDirection.Inwards` starts from the outer most radius and works towards center\n * `NestedDonutDirection.Outwards` starts from the inner most radius the consecutive layers outward.\n * Default: `NestedDonutDirection.Inwards`\n */\n direction?: NestedDonutDirection | string;\n /* Numeric accessor for segment size value. Default: `undefined`. */\n value?: NumericAccessor<Datum>;\n\n /** Central label text. Default: `undefined` */\n centralLabel?: string;\n /** Central sub-label accessor function or text. Default: `undefined` */\n centralSubLabel?: string;\n /** Enables wrapping for the sub-label. Default: `true` */\n centralSubLabelWrap?: boolean;\n /**\n * Show donut background. The color is configurable via\n * the `--vis-nested-donut-background-color` and `--vis-dark-nested-donut-background-color` CSS variables.\n * Default: `false`\n */\n showBackground?: boolean;\n /** Sort function for segments. Default `undefined` */\n sort?: (a: NestedDonutSegment<Datum>, b: NestedDonutSegment<Datum>) => number;\n\n // Layers\n /** Array of accessor functions to defined the nested groups */\n layers: StringAccessor<Datum>[];\n /**\n * Configuration properties for individual layers. Accepts an accessor or constant of type:\n * {\n * backgroundColor?: string;\n * labelAlignment?: NestedDonutSegmentLabelAlignment;\n * width?: number | string;\n * }\n */\n layerSettings?: GenericAccessor<NestedDonutLayerSettings, number>;\n /* Space between layers */\n layerPadding?: number;\n\n // Segments\n /** Corner Radius. Default: `0` */\n cornerRadius?: number;\n /** Angular size for empty segments in radians. Default: `Math.PI / 180` */\n emptySegmentAngle?: number;\n /** Hide segment labels when they don't fit. Default: `true` */\n hideOverflowingSegmentLabels?: boolean;\n /** Color accessor function for segments. Default: `undefined` */\n segmentColor?: ColorAccessor<NestedDonutSegment<Datum>>;\n /** Segment label accessor function. Default `undefined` */\n segmentLabel?: StringAccessor<NestedDonutSegment<Datum>>;\n /** Color accessor function for segment labels */\n segmentLabelColor?: ColorAccessor<NestedDonutSegment<Datum>>;\n /**\n * When true, the component will display empty segments (the ones that have `0` values) as tiny slices.\n * Default: `false`\n */\n showEmptySegments?: boolean;\n /** Show labels for individual segments. Default: `true` */\n showSegmentLabels?: boolean;\n}\n\nexport const NestedDonutDefaultConfig: NestedDonutConfigInterface<unknown> = {\n ...ComponentDefaultConfig,\n angleRange: [0, 2 * Math.PI],\n centralLabel: undefined,\n centralSubLabel: undefined,\n centralSubLabelWrap: true,\n cornerRadius: 0,\n direction: NestedDonutDirection.Inwards,\n emptySegmentAngle: Math.PI / 180,\n hideOverflowingSegmentLabels: true,\n layers: [],\n layerPadding: 0,\n layerSettings: undefined,\n segmentColor: undefined,\n segmentLabel: undefined,\n segmentLabelColor: undefined,\n showBackground: false,\n showEmptySegments: false,\n showSegmentLabels: true,\n sort: undefined,\n value: undefined,\n}\n"],"names":[],"mappings":";;;AAAA;MAwEa,wBAAwB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAChC,sBAAsB,CACzB,EAAA,EAAA,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,EAC5B,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,SAAS,EAC1B,mBAAmB,EAAE,IAAI,EACzB,YAAY,EAAE,CAAC,EACf,SAAS,EAAE,oBAAoB,CAAC,OAAO,EACvC,iBAAiB,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,EAChC,4BAA4B,EAAE,IAAI,EAClC,MAAM,EAAE,EAAE,EACV,YAAY,EAAE,CAAC,EACf,aAAa,EAAE,SAAS,EACxB,YAAY,EAAE,SAAS,EACvB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,SAAS,EAC5B,cAAc,EAAE,KAAK,EACrB,iBAAiB,EAAE,KAAK,EACxB,iBAAiB,EAAE,IAAI,EACvB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,SAAS,EAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/ts",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.4.0-beta.
|
|
4
|
+
"version": "1.4.0-beta.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|