@unovis/ts 1.5.1-exf.3 → 1.5.1-exf.4
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.
- package/components/graph/index.d.ts +6 -0
- package/components/graph/index.js +21 -8
- package/components/graph/index.js.map +1 -1
- package/components/graph/modules/link/index.d.ts +3 -2
- package/components/graph/modules/link/index.js +39 -19
- package/components/graph/modules/link/index.js.map +1 -1
- package/components/graph/modules/node/index.d.ts +2 -0
- package/components/graph/modules/node/index.js +6 -3
- package/components/graph/modules/node/index.js.map +1 -1
- package/components/nested-donut/config.d.ts +1 -1
- package/components/nested-donut/config.js.map +1 -1
- package/components/treemap/config.d.ts +26 -0
- package/components/treemap/config.js +6 -0
- package/components/treemap/config.js.map +1 -0
- package/components/treemap/index.d.ts +14 -0
- package/components/treemap/index.js +149 -0
- package/components/treemap/index.js.map +1 -0
- package/components/treemap/style.d.ts +19 -0
- package/components/treemap/style.js +49 -0
- package/components/treemap/style.js.map +1 -0
- package/components/treemap/types.d.ts +10 -0
- package/components/treemap/types.js +2 -0
- package/components/treemap/types.js.map +1 -0
- package/components.d.ts +2 -0
- package/components.js +1 -0
- package/components.js.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/types.js +1 -0
- package/types.js.map +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { hierarchy, treemap } from 'd3-hierarchy';
|
|
2
|
+
import { group, max } from 'd3-array';
|
|
3
|
+
import { scaleLinear } from 'd3-scale';
|
|
4
|
+
import { ComponentCore } from '../../core/component/index.js';
|
|
5
|
+
import { SeriesDataModel } from '../../data-models/series.js';
|
|
6
|
+
import { getColor } from '../../utils/color.js';
|
|
7
|
+
import { isNumber, getString, getNumber } from '../../utils/data.js';
|
|
8
|
+
import { smartTransition } from '../../utils/d3.js';
|
|
9
|
+
import { TreemapDefaultConfig } from './config.js';
|
|
10
|
+
import * as style from './style.js';
|
|
11
|
+
import { tiles, tile, tileBackground, tileForeground, label } from './style.js';
|
|
12
|
+
|
|
13
|
+
class Treemap extends ComponentCore {
|
|
14
|
+
constructor(config) {
|
|
15
|
+
super();
|
|
16
|
+
this._defaultConfig = TreemapDefaultConfig;
|
|
17
|
+
this.config = this._defaultConfig;
|
|
18
|
+
this.datamodel = new SeriesDataModel();
|
|
19
|
+
if (config)
|
|
20
|
+
this.setConfig(config);
|
|
21
|
+
this.tiles = this.g.append('g').attr('class', tiles);
|
|
22
|
+
}
|
|
23
|
+
_render(customDuration) {
|
|
24
|
+
var _a;
|
|
25
|
+
const { config, datamodel: { data } } = this;
|
|
26
|
+
const duration = isNumber(customDuration) ? customDuration : config.duration;
|
|
27
|
+
if (!((_a = config.layers) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
28
|
+
console.warn('Unovis | Treemap: No layers defined');
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// Map each layer accessor function to get string values from the data array
|
|
32
|
+
const layerAccessors = config.layers.map(layerAccessor => {
|
|
33
|
+
return (i) => getString(data[i], layerAccessor, i);
|
|
34
|
+
});
|
|
35
|
+
// Group the data indices by the layer accessors to create a hierarchical structure
|
|
36
|
+
const nestedData = group(data.keys(), ...layerAccessors);
|
|
37
|
+
const rootNode = config.value !== undefined
|
|
38
|
+
? hierarchy(nestedData).sum(index => typeof index === 'number' && getNumber(data[index], config.value, index))
|
|
39
|
+
: hierarchy(nestedData).count();
|
|
40
|
+
const treemapLayout = treemap()
|
|
41
|
+
.size([this._width, this._height])
|
|
42
|
+
.round(true)
|
|
43
|
+
.padding(this.config.tilePadding);
|
|
44
|
+
if (this.config.tilePaddingTop !== undefined) {
|
|
45
|
+
treemapLayout.paddingTop(this.config.tilePaddingTop);
|
|
46
|
+
}
|
|
47
|
+
const treemapData = treemapLayout(rootNode);
|
|
48
|
+
const descendants = treemapData.descendants();
|
|
49
|
+
// Set up the opacity scale based on depth
|
|
50
|
+
const maxDepth = max(descendants, d => d.depth);
|
|
51
|
+
const opacity = scaleLinear()
|
|
52
|
+
.domain([1, maxDepth])
|
|
53
|
+
.range([1, 0.2]);
|
|
54
|
+
// Set fill color and opacity for each node
|
|
55
|
+
treemapData
|
|
56
|
+
.eachBefore((node) => {
|
|
57
|
+
if (!node.children)
|
|
58
|
+
return;
|
|
59
|
+
node.children.forEach((child, i) => {
|
|
60
|
+
const treemapChild = child;
|
|
61
|
+
// Calculate color for this child using the color accessor function
|
|
62
|
+
const color = getColor(treemapChild, config.tileColor, i, treemapChild.depth !== 1);
|
|
63
|
+
// If no color for this child, use the parent's color
|
|
64
|
+
treemapChild._fill = color !== null && color !== void 0 ? color : node._fill;
|
|
65
|
+
// Set opacity based on depth
|
|
66
|
+
treemapChild._fillOpacity = color === null ? opacity(treemapChild.depth) : null;
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
// Render tiles
|
|
70
|
+
const visibleNodes = descendants.filter(d => d.depth > 0);
|
|
71
|
+
const tiles = this.tiles
|
|
72
|
+
.selectAll(`g.${tile}`)
|
|
73
|
+
.data(visibleNodes, d => d._id);
|
|
74
|
+
const tilesEnter = tiles
|
|
75
|
+
.enter()
|
|
76
|
+
.append('g')
|
|
77
|
+
.attr('class', tile);
|
|
78
|
+
// Tile background rectangles
|
|
79
|
+
tilesEnter
|
|
80
|
+
.append('rect')
|
|
81
|
+
.attr('class', tileBackground)
|
|
82
|
+
// Initialize tile positions so that the initial transition is smooth
|
|
83
|
+
.attr('x', d => d.x0)
|
|
84
|
+
.attr('y', d => d.y0)
|
|
85
|
+
.attr('width', d => d.x1 - d.x0)
|
|
86
|
+
.attr('height', d => d.y1 - d.y0);
|
|
87
|
+
tiles.merge(tilesEnter).select(`rect.${tileBackground}`)
|
|
88
|
+
.call(selection => smartTransition(selection, duration)
|
|
89
|
+
.attr('x', d => d.x0)
|
|
90
|
+
.attr('y', d => d.y0)
|
|
91
|
+
.attr('width', d => d.x1 - d.x0)
|
|
92
|
+
.attr('height', d => d.y1 - d.y0));
|
|
93
|
+
// Tile foreground rectangles
|
|
94
|
+
tilesEnter
|
|
95
|
+
.append('rect')
|
|
96
|
+
.attr('class', tileForeground)
|
|
97
|
+
// Initialize tile positions so that the initial transition is smooth
|
|
98
|
+
.attr('x', d => d.x0)
|
|
99
|
+
.attr('y', d => d.y0)
|
|
100
|
+
.attr('width', d => d.x1 - d.x0)
|
|
101
|
+
.attr('height', d => d.y1 - d.y0)
|
|
102
|
+
.style('fill', d => { var _a; return (_a = d._fill) !== null && _a !== void 0 ? _a : getColor(d, config.tileColor); })
|
|
103
|
+
// Make the tiles fade in on enter
|
|
104
|
+
.style('fill-opacity', 0);
|
|
105
|
+
tiles.merge(tilesEnter).select(`rect.${tileForeground}`)
|
|
106
|
+
.call(selection => smartTransition(selection, duration)
|
|
107
|
+
.style('fill', d => { var _a; return (_a = d._fill) !== null && _a !== void 0 ? _a : getColor(d, config.tileColor); })
|
|
108
|
+
.style('fill-opacity', d => { var _a; return (_a = d._fillOpacity) !== null && _a !== void 0 ? _a : 1; })
|
|
109
|
+
.attr('x', d => d.x0)
|
|
110
|
+
.attr('y', d => d.y0)
|
|
111
|
+
.attr('width', d => d.x1 - d.x0)
|
|
112
|
+
.attr('height', d => d.y1 - d.y0));
|
|
113
|
+
// Tile labels
|
|
114
|
+
tilesEnter
|
|
115
|
+
.append('text')
|
|
116
|
+
.attr('class', label);
|
|
117
|
+
tiles.merge(tilesEnter)
|
|
118
|
+
.filter(config.labelInternalNodes
|
|
119
|
+
? () => true
|
|
120
|
+
: d => !d.children)
|
|
121
|
+
.select(`text.${label}`)
|
|
122
|
+
.attr('x', d => d.x0 + config.labelOffsetX)
|
|
123
|
+
.attr('y', d => d.y0 + config.labelOffsetY)
|
|
124
|
+
.text(d => {
|
|
125
|
+
if (typeof d.data === 'number') {
|
|
126
|
+
const index = d.data;
|
|
127
|
+
// Leaf node case
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
return config.value(data[index]);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
// Internal node case
|
|
134
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
135
|
+
// @ts-ignore
|
|
136
|
+
return d.data[0];
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
// Exit
|
|
140
|
+
const tilesExit = tiles.exit();
|
|
141
|
+
smartTransition(tilesExit, duration)
|
|
142
|
+
.style('opacity', 0)
|
|
143
|
+
.remove();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
Treemap.selectors = style;
|
|
147
|
+
|
|
148
|
+
export { Treemap };
|
|
149
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.ts"],"sourcesContent":["import { Selection } from 'd3-selection'\nimport { hierarchy, treemap } from 'd3-hierarchy'\nimport { group, max } from 'd3-array'\nimport { scaleLinear } from 'd3-scale'\nimport { ComponentCore } from 'core/component'\nimport { SeriesDataModel } from 'data-models/series'\nimport { getColor } from 'utils/color'\nimport { getString, getNumber, isNumber } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { TreemapConfigInterface, TreemapDefaultConfig } from './config'\nimport { TreemapNode } from './types'\n\nimport * as s from './style'\n\nexport class Treemap<Datum> extends ComponentCore<Datum[], TreemapConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig = TreemapDefaultConfig as TreemapConfigInterface<Datum>\n public config: TreemapConfigInterface<Datum> = this._defaultConfig\n\n datamodel: SeriesDataModel<Datum> = new SeriesDataModel()\n tiles: Selection<SVGGElement, unknown, SVGGElement, unknown>\n\n constructor (config?: TreemapConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n this.tiles = this.g.append('g').attr('class', s.tiles)\n }\n\n _render (customDuration?: number): void {\n const { config, datamodel: { data } } = this\n const duration = isNumber(customDuration) ? customDuration : config.duration\n\n if (!config.layers?.length) {\n console.warn('Unovis | Treemap: No layers defined')\n return\n }\n\n // Map each layer accessor function to get string values from the data array\n const layerAccessors = config.layers.map(layerAccessor => {\n return (i: number) => getString(data[i], layerAccessor, i)\n })\n\n // Group the data indices by the layer accessors to create a hierarchical structure\n const nestedData = group(data.keys(), ...layerAccessors as [(d: number) => string])\n\n const rootNode = config.value !== undefined\n ? hierarchy(nestedData).sum(index => typeof index === 'number' && getNumber(data[index], config.value, index))\n : hierarchy(nestedData).count()\n\n const treemapLayout = treemap()\n .size([this._width, this._height])\n .round(true)\n .padding(this.config.tilePadding)\n\n if (this.config.tilePaddingTop !== undefined) {\n treemapLayout.paddingTop(this.config.tilePaddingTop)\n }\n\n const treemapData = treemapLayout(rootNode) as TreemapNode<Datum>\n\n const descendants = treemapData.descendants()\n\n // Set up the opacity scale based on depth\n const maxDepth = max(descendants, d => d.depth)\n const opacity = scaleLinear()\n .domain([1, maxDepth])\n .range([1, 0.2])\n\n // Set fill color and opacity for each node\n treemapData\n .eachBefore((node) => {\n if (!node.children) return\n node.children.forEach((child, i) => {\n const treemapChild = child as TreemapNode<Datum>\n\n // Calculate color for this child using the color accessor function\n const color = getColor(treemapChild, config.tileColor, i, treemapChild.depth !== 1)\n\n // If no color for this child, use the parent's color\n treemapChild._fill = color ?? (node as TreemapNode<Datum>)._fill\n\n // Set opacity based on depth\n treemapChild._fillOpacity = color === null ? opacity(treemapChild.depth) : null\n })\n })\n\n // Render tiles\n const visibleNodes = descendants.filter(d => d.depth > 0)\n const tiles = this.tiles\n .selectAll<SVGGElement, TreemapNode<Datum>>(`g.${s.tile}`)\n .data(visibleNodes, d => d._id)\n const tilesEnter = tiles\n .enter()\n .append('g')\n .attr('class', s.tile)\n\n // Tile background rectangles\n tilesEnter\n .append('rect')\n .attr('class', s.tileBackground)\n\n // Initialize tile positions so that the initial transition is smooth\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', d => d.x1 - d.x0)\n .attr('height', d => d.y1 - d.y0)\n\n tiles.merge(tilesEnter).select(`rect.${s.tileBackground}`)\n .call(selection => smartTransition(selection, duration)\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', d => d.x1 - d.x0)\n .attr('height', d => d.y1 - d.y0)\n )\n\n // Tile foreground rectangles\n tilesEnter\n .append('rect')\n .attr('class', s.tileForeground)\n // Initialize tile positions so that the initial transition is smooth\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', d => d.x1 - d.x0)\n .attr('height', d => d.y1 - d.y0)\n .style('fill', d => d._fill ?? getColor(d, config.tileColor))\n\n // Make the tiles fade in on enter\n .style('fill-opacity', 0)\n\n tiles.merge(tilesEnter).select(`rect.${s.tileForeground}`)\n .call(selection => smartTransition(selection, duration)\n .style('fill', d => d._fill ?? getColor(d, config.tileColor))\n .style('fill-opacity', d => d._fillOpacity ?? 1)\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', d => d.x1 - d.x0)\n .attr('height', d => d.y1 - d.y0)\n )\n\n // Tile labels\n tilesEnter\n .append('text')\n .attr('class', s.label)\n tiles.merge(tilesEnter)\n .filter(config.labelInternalNodes\n ? () => true\n : d => !d.children\n )\n .select(`text.${s.label}`)\n .attr('x', d => d.x0 + config.labelOffsetX)\n .attr('y', d => d.y0 + config.labelOffsetY)\n .text(d => {\n if (typeof d.data === 'number') {\n const index = d.data\n // Leaf node case\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return config.value(data[index])\n } else {\n // Internal node case\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return d.data[0]\n }\n })\n\n // Exit\n const tilesExit = tiles.exit()\n smartTransition(tilesExit, duration)\n .style('opacity', 0)\n .remove()\n }\n}\n"],"names":["s.tiles","s.tile","s.tileBackground","s.tileForeground","s.label","s"],"mappings":";;;;;;;;;;;;AAcM,MAAO,OAAe,SAAQ,aAAqD,CAAA;AAQvF,IAAA,WAAA,CAAa,MAAsC,EAAA;A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C,CAAC,CAAC,QAAQ,CACnB;AACA,aAAA,MAAM,CAAC,CAAQ,KAAA,EAAAA,KAAO,EAAE,CAAC;AACzB,aAAA,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1C,aAAA,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC;aAC1C,IAAI,CAAC,CAAC,IAAG;AACR,YAAA,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE;AAC9B,gBAAA,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAA;;;;gBAIpB,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;AACjC,aAAA;AAAM,iBAAA;;;;AAIL,gBAAA,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,aAAA;AACH,SAAC,CAAC,CAAA;;AAGJ,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;AAC9B,QAAA,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC;AACjC,aAAA,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;AACnB,aAAA,MAAM,EAAE,CAAA;KACZ;;AA5JM,OAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const root: string;
|
|
2
|
+
export declare const variables: {
|
|
3
|
+
treemapTileStrokeColor: "--vis-treemap-tile-stroke-color";
|
|
4
|
+
treemapTileStrokeWidth: "--vis-treemap-tile-stroke-width";
|
|
5
|
+
treemapTileFillColor: "--vis-treemap-tile-fill-color";
|
|
6
|
+
treemapTileBackgroundColor: "--vis-treemap-tile-background-color";
|
|
7
|
+
treemapTileCursor: "--vis-treemap-tile-cursor";
|
|
8
|
+
treemapLabelFontFamily: "--vis-treemap-label-font-family";
|
|
9
|
+
treemapLabelTextColor: "--vis-treemap-label-text-color";
|
|
10
|
+
treemapLabelFontSize: "--vis-treemap-label-font-size";
|
|
11
|
+
darkTreemapTileStrokeColor: "--vis-dark-treemap-tile-stroke-color";
|
|
12
|
+
darkTreemapTileFillColor: "--vis-dark-treemap-tile-fill-color";
|
|
13
|
+
darkTreemapLabelTextColor: "--vis-dark-treemap-label-text-color";
|
|
14
|
+
};
|
|
15
|
+
export declare const tiles: string;
|
|
16
|
+
export declare const tile: string;
|
|
17
|
+
export declare const tileBackground: string;
|
|
18
|
+
export declare const tileForeground: string;
|
|
19
|
+
export declare const label: string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { css } from '@emotion/css';
|
|
2
|
+
import { getCssVarNames, injectGlobalCssVariables } from '../../utils/style.js';
|
|
3
|
+
|
|
4
|
+
const cssVarDefaults = {
|
|
5
|
+
'--vis-treemap-tile-stroke-color': '#fff',
|
|
6
|
+
'--vis-treemap-tile-stroke-width': '1px',
|
|
7
|
+
'--vis-treemap-tile-fill-color': '#B9BEC3',
|
|
8
|
+
'--vis-treemap-tile-background-color': '#fff',
|
|
9
|
+
'--vis-treemap-tile-cursor': 'default',
|
|
10
|
+
/* Undefined by default to allow proper fallback to var(--vis-font-family) */
|
|
11
|
+
'--vis-treemap-label-font-family': undefined,
|
|
12
|
+
'--vis-treemap-label-text-color': '#5b5f6d',
|
|
13
|
+
'--vis-treemap-label-font-size': '12px',
|
|
14
|
+
/* Dark Theme */
|
|
15
|
+
'--vis-dark-treemap-tile-stroke-color': '#2c2c2c',
|
|
16
|
+
'--vis-dark-treemap-tile-fill-color': '#5b5f6d',
|
|
17
|
+
'--vis-dark-treemap-label-text-color': '#fff',
|
|
18
|
+
};
|
|
19
|
+
const root = css `
|
|
20
|
+
label: treemap-component;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
position: relative;
|
|
24
|
+
`;
|
|
25
|
+
const variables = getCssVarNames(cssVarDefaults);
|
|
26
|
+
injectGlobalCssVariables(cssVarDefaults, root);
|
|
27
|
+
const tiles = css `
|
|
28
|
+
label: g-tiles;
|
|
29
|
+
`;
|
|
30
|
+
const tile = css `
|
|
31
|
+
label: tile;
|
|
32
|
+
`;
|
|
33
|
+
const tileBackground = css `
|
|
34
|
+
label: tile-background;
|
|
35
|
+
fill: var(--vis-treemap-tile-background-color);
|
|
36
|
+
`;
|
|
37
|
+
const tileForeground = css `
|
|
38
|
+
label: tile-foreground;
|
|
39
|
+
`;
|
|
40
|
+
const label = css `
|
|
41
|
+
label: label;
|
|
42
|
+
text-anchor: start;
|
|
43
|
+
dominant-baseline: hanging;
|
|
44
|
+
user-select: none;
|
|
45
|
+
font-size: var(--vis-treemap-label-font-size);
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
export { label, root, tile, tileBackground, tileForeground, tiles, variables };
|
|
49
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../src/components/treemap/style.ts"],"sourcesContent":["import { css } from '@emotion/css'\n\n// Utils\nimport { getCssVarNames, injectGlobalCssVariables } from 'utils/style'\n\nconst cssVarDefaults = {\n '--vis-treemap-tile-stroke-color': '#fff',\n '--vis-treemap-tile-stroke-width': '1px',\n '--vis-treemap-tile-fill-color': '#B9BEC3',\n '--vis-treemap-tile-background-color': '#fff',\n '--vis-treemap-tile-cursor': 'default',\n /* Undefined by default to allow proper fallback to var(--vis-font-family) */\n '--vis-treemap-label-font-family': undefined as undefined,\n '--vis-treemap-label-text-color': '#5b5f6d',\n '--vis-treemap-label-font-size': '12px',\n\n /* Dark Theme */\n '--vis-dark-treemap-tile-stroke-color': '#2c2c2c',\n '--vis-dark-treemap-tile-fill-color': '#5b5f6d',\n '--vis-dark-treemap-label-text-color': '#fff',\n}\n\nexport const root = css`\n label: treemap-component;\n width: 100%;\n height: 100%;\n position: relative;\n`\n\nexport const variables = getCssVarNames(cssVarDefaults)\ninjectGlobalCssVariables(cssVarDefaults, root)\n\nexport const tiles = css`\n label: g-tiles;\n`\n\nexport const tile = css`\n label: tile;\n`\n\nexport const tileBackground = css`\n label: tile-background;\n fill: var(--vis-treemap-tile-background-color);\n`\n\nexport const tileForeground = css`\n label: tile-foreground;\n`\n\nexport const label = css`\n label: label;\n text-anchor: start;\n dominant-baseline: hanging;\n user-select: none;\n font-size: var(--vis-treemap-label-font-size);\n`\n"],"names":[],"mappings":";;;AAKA,MAAM,cAAc,GAAG;AACrB,IAAA,iCAAiC,EAAE,MAAM;AACzC,IAAA,iCAAiC,EAAE,KAAK;AACxC,IAAA,+BAA+B,EAAE,SAAS;AAC1C,IAAA,qCAAqC,EAAE,MAAM;AAC7C,IAAA,2BAA2B,EAAE,SAAS;;AAEtC,IAAA,iCAAiC,EAAE,SAAsB;AACzD,IAAA,gCAAgC,EAAE,SAAS;AAC3C,IAAA,+BAA+B,EAAE,MAAM;;AAGvC,IAAA,sCAAsC,EAAE,SAAS;AACjD,IAAA,oCAAoC,EAAE,SAAS;AAC/C,IAAA,qCAAqC,EAAE,MAAM;CAC9C,CAAA;AAEM,MAAM,IAAI,GAAG,GAAG,CAAA,CAAA;;;;;EAKtB;MAEY,SAAS,GAAG,cAAc,CAAC,cAAc,EAAC;AACvD,wBAAwB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;AAEvC,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;EAEvB;AAEM,MAAM,IAAI,GAAG,GAAG,CAAA,CAAA;;EAEtB;AAEM,MAAM,cAAc,GAAG,GAAG,CAAA,CAAA;;;EAGhC;AAEM,MAAM,cAAc,GAAG,GAAG,CAAA,CAAA;;EAEhC;AAEM,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HierarchyRectangularNode } from 'd3-hierarchy';
|
|
2
|
+
export declare type TreemapDatum<Datum> = {
|
|
3
|
+
datum: Datum;
|
|
4
|
+
index: number;
|
|
5
|
+
};
|
|
6
|
+
export interface TreemapNode<Datum> extends HierarchyRectangularNode<TreemapDatum<Datum>> {
|
|
7
|
+
_id: string;
|
|
8
|
+
_fill?: string;
|
|
9
|
+
_fillOpacity?: number | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/components.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export { FreeBrush } from './components/free-brush';
|
|
|
27
27
|
export { XYLabels } from './components/xy-labels';
|
|
28
28
|
export { NestedDonut } from './components/nested-donut';
|
|
29
29
|
export { Annotations } from "./components/annotations";
|
|
30
|
+
export { Treemap } from './components/treemap';
|
|
30
31
|
export * from './components/donut/constants';
|
|
31
32
|
export type { LineConfigInterface } from './components/line/config';
|
|
32
33
|
export type { StackedBarConfigInterface } from './components/stacked-bar/config';
|
|
@@ -52,3 +53,4 @@ export type { FreeBrushConfigInterface } from './components/free-brush/config';
|
|
|
52
53
|
export type { XYLabelsConfigInterface } from './components/xy-labels/config';
|
|
53
54
|
export type { NestedDonutConfigInterface } from './components/nested-donut/config';
|
|
54
55
|
export type { AnnotationsConfigInterface } from './components/annotations/config';
|
|
56
|
+
export type { TreemapConfigInterface } from './components/treemap/config';
|
package/components.js
CHANGED
|
@@ -25,6 +25,7 @@ export { FreeBrush } from './components/free-brush/index.js';
|
|
|
25
25
|
export { XYLabels } from './components/xy-labels/index.js';
|
|
26
26
|
export { NestedDonut } from './components/nested-donut/index.js';
|
|
27
27
|
export { Annotations } from './components/annotations/index.js';
|
|
28
|
+
export { Treemap } from './components/treemap/index.js';
|
|
28
29
|
export { DONUT_HALF_ANGLE_RANGES, DONUT_HALF_ANGLE_RANGE_BOTTOM, DONUT_HALF_ANGLE_RANGE_LEFT, DONUT_HALF_ANGLE_RANGE_RIGHT, DONUT_HALF_ANGLE_RANGE_TOP } from './components/donut/constants.js';
|
|
29
30
|
|
|
30
31
|
// Core
|
package/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sources":["../src/components.ts"],"sourcesContent":["// Core\nexport { ComponentCore } from 'core/component'\nexport type { ComponentConfigInterface } from 'core/component/config'\nexport { XYComponentCore } from 'core/xy-component'\nexport type { XYComponentConfigInterface } from 'core/xy-component/config'\n\n// Components\nexport { Tooltip } from 'components/tooltip'\nexport { Line } from './components/line'\nexport { StackedBar } from './components/stacked-bar'\nexport { GroupedBar } from './components/grouped-bar'\nexport { Axis } from './components/axis'\nexport { Scatter } from './components/scatter'\nexport { Brush } from './components/brush'\nexport { BulletLegend } from './components/bullet-legend'\nexport { FlowLegend } from './components/flow-legend'\nexport { Crosshair } from './components/crosshair'\nexport { Timeline } from './components/timeline'\nexport { Sankey } from './components/sankey'\nexport { Area } from './components/area'\nexport { TopoJSONMap } from './components/topojson-map'\nexport { LeafletMap } from './components/leaflet-map'\nexport { MapLibreArcticDark, MapLibreArcticLight } from './components/leaflet-map/renderer/map-style'\nexport { LeafletFlowMap } from './components/leaflet-flow-map'\nexport { ChordDiagram } from './components/chord-diagram'\nexport { Graph } from './components/graph'\nexport { VisControls } from './components/vis-controls'\nexport { Donut } from './components/donut'\nexport { FreeBrush } from './components/free-brush'\nexport { XYLabels } from './components/xy-labels'\nexport { NestedDonut } from './components/nested-donut'\nexport { Annotations } from 'components/annotations'\n\n// Constants\nexport * from './components/donut/constants'\n\n// Config Interfaces\nexport type { LineConfigInterface } from './components/line/config'\nexport type { StackedBarConfigInterface } from './components/stacked-bar/config'\nexport type { GroupedBarConfigInterface } from './components/grouped-bar/config'\nexport type { ScatterConfigInterface } from './components/scatter/config'\nexport type { TooltipConfigInterface } from './components/tooltip/config'\nexport type { BrushConfigInterface } from './components/brush/config'\nexport type { AxisConfigInterface } from './components/axis/config'\nexport type { BulletLegendConfigInterface } from './components/bullet-legend/config'\nexport type { FlowLegendConfigInterface } from './components/flow-legend/config'\nexport type { CrosshairConfigInterface } from './components/crosshair/config'\nexport type { TimelineConfigInterface } from './components/timeline/config'\nexport type { SankeyConfigInterface } from './components/sankey/config'\nexport type { AreaConfigInterface } from './components/area/config'\nexport type { TopoJSONMapConfigInterface } from './components/topojson-map/config'\nexport type { LeafletMapConfigInterface } from './components/leaflet-map/config'\nexport type { LeafletFlowMapConfigInterface } from './components/leaflet-flow-map/config'\nexport type { ChordDiagramConfigInterface } from './components/chord-diagram/config'\nexport type { GraphConfigInterface } from './components/graph/config'\nexport type { VisControlsConfigInterface } from './components/vis-controls/config'\nexport type { DonutConfigInterface } from './components/donut/config'\nexport type { FreeBrushConfigInterface } from './components/free-brush/config'\nexport type { XYLabelsConfigInterface } from './components/xy-labels/config'\nexport type { NestedDonutConfigInterface } from './components/nested-donut/config'\nexport type { AnnotationsConfigInterface } from './components/annotations/config'\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.js","sources":["../src/components.ts"],"sourcesContent":["// Core\nexport { ComponentCore } from 'core/component'\nexport type { ComponentConfigInterface } from 'core/component/config'\nexport { XYComponentCore } from 'core/xy-component'\nexport type { XYComponentConfigInterface } from 'core/xy-component/config'\n\n// Components\nexport { Tooltip } from 'components/tooltip'\nexport { Line } from './components/line'\nexport { StackedBar } from './components/stacked-bar'\nexport { GroupedBar } from './components/grouped-bar'\nexport { Axis } from './components/axis'\nexport { Scatter } from './components/scatter'\nexport { Brush } from './components/brush'\nexport { BulletLegend } from './components/bullet-legend'\nexport { FlowLegend } from './components/flow-legend'\nexport { Crosshair } from './components/crosshair'\nexport { Timeline } from './components/timeline'\nexport { Sankey } from './components/sankey'\nexport { Area } from './components/area'\nexport { TopoJSONMap } from './components/topojson-map'\nexport { LeafletMap } from './components/leaflet-map'\nexport { MapLibreArcticDark, MapLibreArcticLight } from './components/leaflet-map/renderer/map-style'\nexport { LeafletFlowMap } from './components/leaflet-flow-map'\nexport { ChordDiagram } from './components/chord-diagram'\nexport { Graph } from './components/graph'\nexport { VisControls } from './components/vis-controls'\nexport { Donut } from './components/donut'\nexport { FreeBrush } from './components/free-brush'\nexport { XYLabels } from './components/xy-labels'\nexport { NestedDonut } from './components/nested-donut'\nexport { Annotations } from 'components/annotations'\nexport { Treemap } from './components/treemap'\n\n// Constants\nexport * from './components/donut/constants'\n\n// Config Interfaces\nexport type { LineConfigInterface } from './components/line/config'\nexport type { StackedBarConfigInterface } from './components/stacked-bar/config'\nexport type { GroupedBarConfigInterface } from './components/grouped-bar/config'\nexport type { ScatterConfigInterface } from './components/scatter/config'\nexport type { TooltipConfigInterface } from './components/tooltip/config'\nexport type { BrushConfigInterface } from './components/brush/config'\nexport type { AxisConfigInterface } from './components/axis/config'\nexport type { BulletLegendConfigInterface } from './components/bullet-legend/config'\nexport type { FlowLegendConfigInterface } from './components/flow-legend/config'\nexport type { CrosshairConfigInterface } from './components/crosshair/config'\nexport type { TimelineConfigInterface } from './components/timeline/config'\nexport type { SankeyConfigInterface } from './components/sankey/config'\nexport type { AreaConfigInterface } from './components/area/config'\nexport type { TopoJSONMapConfigInterface } from './components/topojson-map/config'\nexport type { LeafletMapConfigInterface } from './components/leaflet-map/config'\nexport type { LeafletFlowMapConfigInterface } from './components/leaflet-flow-map/config'\nexport type { ChordDiagramConfigInterface } from './components/chord-diagram/config'\nexport type { GraphConfigInterface } from './components/graph/config'\nexport type { VisControlsConfigInterface } from './components/vis-controls/config'\nexport type { DonutConfigInterface } from './components/donut/config'\nexport type { FreeBrushConfigInterface } from './components/free-brush/config'\nexport type { XYLabelsConfigInterface } from './components/xy-labels/config'\nexport type { NestedDonutConfigInterface } from './components/nested-donut/config'\nexport type { AnnotationsConfigInterface } from './components/annotations/config'\nexport type { TreemapConfigInterface } from './components/treemap/config'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA"}
|
package/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export { FreeBrush } from './components/free-brush/index.js';
|
|
|
34
34
|
export { XYLabels } from './components/xy-labels/index.js';
|
|
35
35
|
export { NestedDonut } from './components/nested-donut/index.js';
|
|
36
36
|
export { Annotations } from './components/annotations/index.js';
|
|
37
|
+
export { Treemap } from './components/treemap/index.js';
|
|
37
38
|
export { DONUT_HALF_ANGLE_RANGES, DONUT_HALF_ANGLE_RANGE_BOTTOM, DONUT_HALF_ANGLE_RANGE_LEFT, DONUT_HALF_ANGLE_RANGE_RIGHT, DONUT_HALF_ANGLE_RANGE_TOP } from './components/donut/constants.js';
|
|
38
39
|
export { Curve, CurveType } from './types/curve.js';
|
|
39
40
|
export { Symbol, SymbolType } from './types/symbol.js';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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, Vue, Solid, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.5.1-exf.
|
|
4
|
+
"version": "1.5.1-exf.4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|
package/types.d.ts
CHANGED
package/types.js
CHANGED
|
@@ -26,6 +26,7 @@ export { BulletLegendOrientation, BulletShape } from './components/bullet-legend
|
|
|
26
26
|
export { XYLabelPositioning } from './components/xy-labels/types.js';
|
|
27
27
|
export { NestedDonutDirection, NestedDonutSegmentLabelAlignment } from './components/nested-donut/types.js';
|
|
28
28
|
import './components/annotations/types.js';
|
|
29
|
+
import './components/treemap/types.js';
|
|
29
30
|
|
|
30
31
|
/* eslint-disable max-len */
|
|
31
32
|
//# sourceMappingURL=types.js.map
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["/* eslint-disable max-len */\n// Global Types\nexport * from 'types/accessor'\nexport * from 'types/curve'\nexport * from 'types/symbol'\nexport * from 'types/scale'\nexport * from 'types/position'\nexport * from 'types/shape'\nexport * from 'types/component'\nexport * from 'types/text'\nexport * from 'types/map'\nexport * from 'types/spacing'\nexport * from 'types/graph'\nexport * from 'types/data'\nexport * from 'types/direction'\n\n// Component Types\nexport * from 'core/component/types'\nexport * from 'components/crosshair/types'\nexport * from 'components/axis/types'\nexport * from 'components/chord-diagram/types'\nexport * from 'components/topojson-map/types'\nexport * from 'components/leaflet-map/types'\nexport * from 'components/leaflet-map/renderer/map-style'\nexport * from 'components/graph/types'\nexport * from 'components/sankey/types'\nexport * from 'components/vis-controls/types'\nexport * from 'components/free-brush/types'\nexport * from 'components/bullet-legend/types'\nexport * from 'components/xy-labels/types'\nexport * from 'components/nested-donut/types'\nexport * from 'components/annotations/types'\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["/* eslint-disable max-len */\n// Global Types\nexport * from 'types/accessor'\nexport * from 'types/curve'\nexport * from 'types/symbol'\nexport * from 'types/scale'\nexport * from 'types/position'\nexport * from 'types/shape'\nexport * from 'types/component'\nexport * from 'types/text'\nexport * from 'types/map'\nexport * from 'types/spacing'\nexport * from 'types/graph'\nexport * from 'types/data'\nexport * from 'types/direction'\n\n// Component Types\nexport * from 'core/component/types'\nexport * from 'components/crosshair/types'\nexport * from 'components/axis/types'\nexport * from 'components/chord-diagram/types'\nexport * from 'components/topojson-map/types'\nexport * from 'components/leaflet-map/types'\nexport * from 'components/leaflet-map/renderer/map-style'\nexport * from 'components/graph/types'\nexport * from 'components/sankey/types'\nexport * from 'components/vis-controls/types'\nexport * from 'components/free-brush/types'\nexport * from 'components/bullet-legend/types'\nexport * from 'components/xy-labels/types'\nexport * from 'components/nested-donut/types'\nexport * from 'components/annotations/types'\nexport * from 'components/treemap/types'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA"}
|