vue-chrts 2.1.0-beta-7 → 2.1.0-beta-9
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/dist/components/AreaChart/{types.d.ts → AreaChart.d.ts} +2 -22
- package/dist/components/AreaChart/AreaChart.js +95 -116
- package/dist/components/AreaChart/AreaChart.vue.d.ts +1 -1
- package/dist/components/AreaChart/index.d.ts +2 -0
- package/dist/components/BarChart/{types.d.ts → BarChart.d.ts} +12 -11
- package/dist/components/BarChart/BarChart.js +9 -9
- package/dist/components/BarChart/BarChart.vue.d.ts +1 -1
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/BubbleChart/{types.d.ts → BubbleChart.d.ts} +2 -1
- package/dist/components/BubbleChart/BubbleChart.js +4 -4
- package/dist/components/BubbleChart/BubbleChart.vue.d.ts +1 -1
- package/dist/components/BubbleChart/index.d.ts +2 -0
- package/dist/components/DagreGraph/DagreGraph.d.ts +254 -0
- package/dist/components/DagreGraph/DagreGraph.js +65 -62
- package/dist/components/DagreGraph/DagreGraph.vue.d.ts +1 -1
- package/dist/components/DagreGraph/index.d.ts +2 -0
- package/dist/components/DagreGraph/types.d.ts +2 -1
- package/dist/components/DonutChart/{types.d.ts → DonutChart.d.ts} +7 -7
- package/dist/components/DonutChart/DonutChart.js +3 -3
- package/dist/components/DonutChart/DonutChart.vue.d.ts +1 -1
- package/dist/components/DonutChart/DonutChart2.js +2 -2
- package/dist/components/DonutChart/DonutChart3.js +4 -0
- package/dist/components/DonutChart/index.d.ts +2 -0
- package/dist/components/DualChart/DualChart.d.ts +195 -0
- package/dist/components/DualChart/DualChart.js +125 -122
- package/dist/components/DualChart/DualChart.vue.d.ts +1 -1
- package/dist/components/DualChart/index.d.ts +2 -0
- package/dist/components/DualChart/types.d.ts +2 -2
- package/dist/components/GanttChart/{types.d.ts → GanttChart.d.ts} +2 -1
- package/dist/components/GanttChart/GanttChart.js +6 -6
- package/dist/components/GanttChart/GanttChart.vue.d.ts +1 -1
- package/dist/components/GanttChart/index.d.ts +2 -0
- package/dist/components/LineChart/{types.d.ts → LineChart.d.ts} +1 -1
- package/dist/components/LineChart/LineChart.js +7 -12
- package/dist/components/LineChart/LineChart.vue.d.ts +1 -1
- package/dist/components/LineChart/index.d.ts +2 -0
- package/dist/components/Maps/DottedMap/DottedMap.js +2 -2
- package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +2 -2
- package/dist/components/Maps/DottedMap/core.js +2 -2
- package/dist/components/Maps/DottedMap/core.vue.d.ts +2 -2
- package/dist/components/Maps/DottedMap/mapUtils.js +22 -22
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +5 -5
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +2 -2
- package/dist/components/Maps/TopoJSONMap/types.d.ts +2 -1
- package/dist/components/Maps/index.d.ts +5 -0
- package/dist/components/SankeyChart/SankeyChart.d.ts +117 -0
- package/dist/components/SankeyChart/SankeyChart.js +59 -56
- package/dist/components/SankeyChart/SankeyChart.vue.d.ts +1 -1
- package/dist/components/SankeyChart/index.d.ts +2 -0
- package/dist/components/SankeyChart/types.d.ts +2 -1
- package/dist/components/Tooltip.js +5 -5
- package/dist/enums.d.ts +32 -0
- package/dist/index.d.ts +12 -14
- package/dist/index.js +31 -31
- package/dist/types.d.ts +2 -46
- package/package.json +16 -10
- package/dist/components/DonutChart/types.js +0 -4
- package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.1/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +0 -28
- package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +0 -20
- package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +0 -222
- package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +0 -25
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +0 -24
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +0 -46
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +0 -31
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +0 -15
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +0 -13
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +0 -9
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +0 -11
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +0 -13
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +0 -14
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +0 -33
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +0 -1278
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +0 -226
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +0 -17
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +0 -25
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +0 -22
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +0 -65
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +0 -82
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +0 -94
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +0 -39
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +0 -30
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +0 -12
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +0 -9
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +0 -25
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +0 -11
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +0 -128
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +0 -47
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +0 -119
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +0 -43
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +0 -36
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +0 -55
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +0 -52
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +0 -36
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +0 -27
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +0 -48
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +0 -30
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +0 -54
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +0 -27
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +0 -26
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +0 -49
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +0 -28
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +0 -31
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +0 -134
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +0 -61
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +0 -19
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +0 -49
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +0 -26
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +0 -37
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +0 -48
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +0 -173
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +0 -58
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +0 -28
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +0 -68
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +0 -67
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +0 -104
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +0 -47
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +0 -34
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +0 -46
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +0 -33
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +0 -60
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +0 -110
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +0 -22
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +0 -34
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +0 -34
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +0 -49
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +0 -38
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +0 -23
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +0 -30
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +0 -9
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +0 -20
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +0 -171
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +0 -11
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +0 -7
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +0 -104
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +0 -117
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +0 -89
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +0 -73
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +0 -12
- /package/dist/{types.js → enums.js} +0 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { BulletLegendItemInterface, TooltipConfig } from '../../types';
|
|
2
|
+
import { LegendPosition } from '../../enums';
|
|
3
|
+
/**
|
|
4
|
+
* Dagre layout direction options
|
|
5
|
+
*/
|
|
6
|
+
export type DagreRankDir = "TB" | "BT" | "LR" | "RL";
|
|
7
|
+
/**
|
|
8
|
+
* Dagre layout alignment options
|
|
9
|
+
*/
|
|
10
|
+
export type DagreAlign = "UL" | "UR" | "DL" | "DR";
|
|
11
|
+
/**
|
|
12
|
+
* Dagre ranking algorithm options
|
|
13
|
+
*/
|
|
14
|
+
export type DagreRanker = "network-simplex" | "tight-tree" | "longest-path";
|
|
15
|
+
/**
|
|
16
|
+
* Node shape options
|
|
17
|
+
*/
|
|
18
|
+
export type NodeShape = "circle" | "square" | "triangle" | "diamond";
|
|
19
|
+
/**
|
|
20
|
+
* Link arrow position options
|
|
21
|
+
*/
|
|
22
|
+
export type LinkArrowPosition = "start" | "end" | "both" | "none";
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for Dagre layout algorithm
|
|
25
|
+
*/
|
|
26
|
+
export interface DagreLayoutSettings {
|
|
27
|
+
/**
|
|
28
|
+
* Direction of the layout: 'TB' (top-to-bottom), 'BT' (bottom-to-top),
|
|
29
|
+
* 'LR' (left-to-right), 'RL' (right-to-left)
|
|
30
|
+
* @default 'TB'
|
|
31
|
+
*/
|
|
32
|
+
rankdir?: DagreRankDir;
|
|
33
|
+
/**
|
|
34
|
+
* Alignment of nodes: 'UL' (up-left), 'UR' (up-right), 'DL' (down-left), 'DR' (down-right)
|
|
35
|
+
*/
|
|
36
|
+
align?: DagreAlign;
|
|
37
|
+
/**
|
|
38
|
+
* Horizontal spacing between nodes in pixels
|
|
39
|
+
* @default 50
|
|
40
|
+
*/
|
|
41
|
+
nodesep?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Spacing between edges in pixels
|
|
44
|
+
* @default 10
|
|
45
|
+
*/
|
|
46
|
+
edgesep?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Vertical spacing between ranks in pixels
|
|
49
|
+
* @default 50
|
|
50
|
+
*/
|
|
51
|
+
ranksep?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Algorithm to use for ranking nodes
|
|
54
|
+
* @default 'network-simplex'
|
|
55
|
+
*/
|
|
56
|
+
ranker?: DagreRanker;
|
|
57
|
+
/**
|
|
58
|
+
* Horizontal margin in pixels
|
|
59
|
+
* @default 0
|
|
60
|
+
*/
|
|
61
|
+
marginx?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Vertical margin in pixels
|
|
64
|
+
* @default 0
|
|
65
|
+
*/
|
|
66
|
+
marginy?: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Node data structure for the graph
|
|
70
|
+
*/
|
|
71
|
+
export interface GraphNodeDatum {
|
|
72
|
+
/**
|
|
73
|
+
* Unique identifier for the node
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
/**
|
|
77
|
+
* Display label for the node
|
|
78
|
+
*/
|
|
79
|
+
label?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Node level (for hierarchical data)
|
|
82
|
+
*/
|
|
83
|
+
level?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Additional data associated with the node
|
|
86
|
+
*/
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Link/Edge data structure for the graph
|
|
91
|
+
*/
|
|
92
|
+
export interface GraphLinkDatum {
|
|
93
|
+
/**
|
|
94
|
+
* Source node ID
|
|
95
|
+
*/
|
|
96
|
+
source: string;
|
|
97
|
+
/**
|
|
98
|
+
* Target node ID
|
|
99
|
+
*/
|
|
100
|
+
target: string;
|
|
101
|
+
/**
|
|
102
|
+
* Label for the link
|
|
103
|
+
*/
|
|
104
|
+
label?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Additional data associated with the link
|
|
107
|
+
*/
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Graph data structure containing nodes and links
|
|
112
|
+
*/
|
|
113
|
+
export interface GraphData<N = GraphNodeDatum, L = GraphLinkDatum> {
|
|
114
|
+
/**
|
|
115
|
+
* Array of node data
|
|
116
|
+
*/
|
|
117
|
+
nodes: N[];
|
|
118
|
+
/**
|
|
119
|
+
* Array of link data
|
|
120
|
+
*/
|
|
121
|
+
links: L[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Props for the DagreGraph component
|
|
125
|
+
*/
|
|
126
|
+
export interface DagreGraphProps<N = GraphNodeDatum, L = GraphLinkDatum> {
|
|
127
|
+
/**
|
|
128
|
+
* The graph data containing nodes and links
|
|
129
|
+
*/
|
|
130
|
+
data: GraphData<N, L>;
|
|
131
|
+
/**
|
|
132
|
+
* The height of the graph container in pixels
|
|
133
|
+
* @default 600
|
|
134
|
+
*/
|
|
135
|
+
height?: number;
|
|
136
|
+
/**
|
|
137
|
+
* The width of the graph container in pixels
|
|
138
|
+
* @default undefined (auto)
|
|
139
|
+
*/
|
|
140
|
+
width?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Dagre layout configuration
|
|
143
|
+
*/
|
|
144
|
+
dagreLayoutSettings?: DagreLayoutSettings;
|
|
145
|
+
/**
|
|
146
|
+
* Function or value to determine node size
|
|
147
|
+
* @default 40
|
|
148
|
+
*/
|
|
149
|
+
nodeSize?: number | ((node: N, index: number) => number);
|
|
150
|
+
/**
|
|
151
|
+
* Function to extract node label
|
|
152
|
+
*/
|
|
153
|
+
nodeLabel?: (node: N, index: number) => string;
|
|
154
|
+
/**
|
|
155
|
+
* Function or value to determine node shape
|
|
156
|
+
*/
|
|
157
|
+
nodeShape?: NodeShape | ((node: N, index: number) => NodeShape);
|
|
158
|
+
/**
|
|
159
|
+
* Function or value to determine node fill color
|
|
160
|
+
*/
|
|
161
|
+
nodeFill?: string | ((node: N, index: number) => string);
|
|
162
|
+
/**
|
|
163
|
+
* Function or value to determine node stroke color
|
|
164
|
+
*/
|
|
165
|
+
nodeStroke?: string | ((node: N, index: number) => string);
|
|
166
|
+
/**
|
|
167
|
+
* Function or value to determine node stroke width
|
|
168
|
+
*/
|
|
169
|
+
nodeStrokeWidth?: number | ((node: N, index: number) => number);
|
|
170
|
+
/**
|
|
171
|
+
* Link arrow configuration
|
|
172
|
+
* @default 'end'
|
|
173
|
+
*/
|
|
174
|
+
linkArrow?: LinkArrowPosition;
|
|
175
|
+
/**
|
|
176
|
+
* Function to extract link label
|
|
177
|
+
*/
|
|
178
|
+
linkLabel?: (link: L, index: number) => string;
|
|
179
|
+
/**
|
|
180
|
+
* Function or value to determine link color
|
|
181
|
+
*/
|
|
182
|
+
linkStroke?: string | ((link: L, index: number) => string);
|
|
183
|
+
/**
|
|
184
|
+
* Function or value to determine link width
|
|
185
|
+
*/
|
|
186
|
+
linkWidth?: number | ((link: L, index: number) => number);
|
|
187
|
+
/**
|
|
188
|
+
* Link curvature amount (0-1)
|
|
189
|
+
* @default 0
|
|
190
|
+
*/
|
|
191
|
+
linkCurvature?: number;
|
|
192
|
+
/**
|
|
193
|
+
* Optional padding applied to the graph
|
|
194
|
+
*/
|
|
195
|
+
padding?: {
|
|
196
|
+
top: number;
|
|
197
|
+
right: number;
|
|
198
|
+
bottom: number;
|
|
199
|
+
left: number;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* If true, hides the tooltip
|
|
203
|
+
*/
|
|
204
|
+
hideTooltip?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Enable zoom and pan controls
|
|
207
|
+
* @default true
|
|
208
|
+
*/
|
|
209
|
+
zoomEnabled?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Zoom scale extent [min, max]
|
|
212
|
+
* @default [0.1, 10]
|
|
213
|
+
*/
|
|
214
|
+
zoomScaleExtent?: [number, number];
|
|
215
|
+
/**
|
|
216
|
+
* Enable node dragging
|
|
217
|
+
* @default false
|
|
218
|
+
*/
|
|
219
|
+
nodeDraggingEnabled?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* If true, hides the legend
|
|
222
|
+
*/
|
|
223
|
+
hideLegend?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Legend position
|
|
226
|
+
* @default LegendPosition.BottomCenter
|
|
227
|
+
*/
|
|
228
|
+
legendPosition?: LegendPosition;
|
|
229
|
+
/**
|
|
230
|
+
* Legend style
|
|
231
|
+
*/
|
|
232
|
+
legendStyle?: string | Record<string, string>;
|
|
233
|
+
/**
|
|
234
|
+
* Legend items configuration
|
|
235
|
+
*/
|
|
236
|
+
legendItems?: BulletLegendItemInterface[];
|
|
237
|
+
/**
|
|
238
|
+
* Custom formatter for tooltip titles
|
|
239
|
+
*/
|
|
240
|
+
tooltipTitleFormatter?: (node: N) => string | number;
|
|
241
|
+
/**
|
|
242
|
+
* Custom formatter for tooltip content
|
|
243
|
+
*/
|
|
244
|
+
tooltipContentFormatter?: (node: N) => string;
|
|
245
|
+
/**
|
|
246
|
+
* Configuration object for the chart tooltip.
|
|
247
|
+
*/
|
|
248
|
+
tooltip?: TooltipConfig;
|
|
249
|
+
/**
|
|
250
|
+
* Animation duration in milliseconds
|
|
251
|
+
* @default 600
|
|
252
|
+
*/
|
|
253
|
+
duration?: number;
|
|
254
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VisSingleContainer as
|
|
3
|
-
import { Graph as
|
|
4
|
-
import { LegendPosition as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as N, useSlots as V, useTemplateRef as P, ref as G, computed as l, openBlock as u, createElementBlock as c, normalizeStyle as f, createVNode as k, unref as d, withCtx as I, createBlock as Z, createCommentVNode as s, createElementVNode as g, renderSlot as m, toDisplayString as S } from "vue";
|
|
2
|
+
import { VisSingleContainer as $, VisTooltip as j, VisGraph as R, VisBulletLegend as q } from "@unovis/vue";
|
|
3
|
+
import { Graph as p, GraphLayoutType as H } from "@unovis/ts";
|
|
4
|
+
import { LegendPosition as J } from "../../enums.js";
|
|
5
|
+
const K = {
|
|
6
6
|
ref: "slotWrapper",
|
|
7
7
|
style: { display: "none" }
|
|
8
|
-
},
|
|
8
|
+
}, O = { class: "dagre-tooltip" }, Q = { class: "font-semibold" }, U = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-sm text-gray-500"
|
|
11
|
-
},
|
|
11
|
+
}, te = /* @__PURE__ */ N({
|
|
12
12
|
__name: "DagreGraph",
|
|
13
13
|
props: {
|
|
14
14
|
data: {},
|
|
@@ -39,7 +39,7 @@ const H = {
|
|
|
39
39
|
zoomScaleExtent: { default: () => [0.1, 10] },
|
|
40
40
|
nodeDraggingEnabled: { type: Boolean, default: !1 },
|
|
41
41
|
hideLegend: { type: Boolean, default: !0 },
|
|
42
|
-
legendPosition: { default:
|
|
42
|
+
legendPosition: { default: J.BottomCenter },
|
|
43
43
|
legendStyle: { default: void 0 },
|
|
44
44
|
legendItems: { default: () => [] },
|
|
45
45
|
tooltipTitleFormatter: {},
|
|
@@ -50,10 +50,10 @@ const H = {
|
|
|
50
50
|
duration: { default: 600 }
|
|
51
51
|
},
|
|
52
52
|
emits: ["nodeClick", "nodeMouseover", "nodeMouseout", "linkClick", "linkMouseover", "linkMouseout"],
|
|
53
|
-
setup(t, { emit:
|
|
54
|
-
const e = t,
|
|
55
|
-
|
|
56
|
-
const i =
|
|
53
|
+
setup(t, { emit: v }) {
|
|
54
|
+
const e = t, a = v, b = V();
|
|
55
|
+
P("slotWrapper");
|
|
56
|
+
const i = G(), C = l(() => typeof e.nodeSize == "function" ? e.nodeSize : () => e.nodeSize), L = l(() => e.nodeLabel ? e.nodeLabel : (o) => o.label || o.id), F = l(() => typeof e.nodeShape == "function" ? e.nodeShape : () => e.nodeShape), w = l(() => typeof e.nodeFill == "function" ? e.nodeFill : () => e.nodeFill), A = l(() => typeof e.nodeStroke == "function" ? e.nodeStroke : () => e.nodeStroke), W = l(() => typeof e.nodeStrokeWidth == "function" ? e.nodeStrokeWidth : () => e.nodeStrokeWidth), x = l(() => e.linkLabel ? e.linkLabel : (o) => o.label || ""), z = l(() => typeof e.linkStroke == "function" ? e.linkStroke : () => e.linkStroke), T = l(() => typeof e.linkWidth == "function" ? e.linkWidth : () => e.linkWidth), B = l(() => {
|
|
57
57
|
switch (e.linkArrow) {
|
|
58
58
|
case "start":
|
|
59
59
|
return "start";
|
|
@@ -66,100 +66,103 @@ const H = {
|
|
|
66
66
|
default:
|
|
67
67
|
return "end";
|
|
68
68
|
}
|
|
69
|
-
}),
|
|
70
|
-
[
|
|
69
|
+
}), D = l(() => e.legendPosition.startsWith("top")), E = l(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center"), M = {
|
|
70
|
+
[p.selectors.node]: {
|
|
71
71
|
click: (o, n) => {
|
|
72
|
-
|
|
72
|
+
a("nodeClick", o, n);
|
|
73
73
|
},
|
|
74
74
|
mouseover: (o, n) => {
|
|
75
|
-
i.value = o,
|
|
75
|
+
i.value = o, a("nodeMouseover", o, n);
|
|
76
76
|
},
|
|
77
77
|
mouseout: (o, n) => {
|
|
78
|
-
i.value = void 0,
|
|
78
|
+
i.value = void 0, a("nodeMouseout", o, n);
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
[
|
|
81
|
+
[p.selectors.link]: {
|
|
82
82
|
click: (o, n) => {
|
|
83
|
-
|
|
83
|
+
a("linkClick", o, n);
|
|
84
84
|
},
|
|
85
85
|
mouseover: (o, n) => {
|
|
86
|
-
|
|
86
|
+
a("linkMouseover", o, n);
|
|
87
87
|
},
|
|
88
88
|
mouseout: (o, n) => {
|
|
89
|
-
|
|
89
|
+
a("linkMouseout", o, n);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
return (o, n) => (u(), c("div", {
|
|
94
94
|
style: f({
|
|
95
95
|
display: "flex",
|
|
96
|
-
flexDirection:
|
|
96
|
+
flexDirection: D.value ? "column-reverse" : "column",
|
|
97
97
|
gap: "var(--vis-legend-spacing)"
|
|
98
98
|
}),
|
|
99
99
|
class: "dagre-graph-container"
|
|
100
100
|
}, [
|
|
101
|
-
k(
|
|
101
|
+
k(d($), {
|
|
102
102
|
data: t.data,
|
|
103
103
|
height: t.height,
|
|
104
104
|
width: t.width,
|
|
105
105
|
duration: t.duration,
|
|
106
106
|
padding: t.padding
|
|
107
107
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
108
|
+
default: I(() => {
|
|
109
|
+
var r, h, y;
|
|
110
|
+
return [
|
|
111
|
+
t.hideTooltip ? s("", !0) : (u(), Z(d(j), {
|
|
112
|
+
key: 0,
|
|
113
|
+
followCursor: (r = e.tooltip) == null ? void 0 : r.followCursor,
|
|
114
|
+
"show-delay": (h = e.tooltip) == null ? void 0 : h.showDelay,
|
|
115
|
+
"hide-delay": (y = e.tooltip) == null ? void 0 : y.hideDelay
|
|
116
|
+
}, null, 8, ["followCursor", "show-delay", "hide-delay"])),
|
|
117
|
+
k(d(R), {
|
|
118
|
+
layoutType: d(H).Dagre,
|
|
119
|
+
dagreLayoutSettings: t.dagreLayoutSettings,
|
|
120
|
+
nodeSize: C.value,
|
|
121
|
+
nodeLabel: L.value,
|
|
122
|
+
nodeShape: F.value,
|
|
123
|
+
nodeFill: w.value,
|
|
124
|
+
nodeStroke: A.value,
|
|
125
|
+
nodeStrokeWidth: W.value,
|
|
126
|
+
linkArrow: B.value,
|
|
127
|
+
linkLabel: x.value,
|
|
128
|
+
linkStroke: z.value,
|
|
129
|
+
linkWidth: T.value,
|
|
130
|
+
linkCurvature: t.linkCurvature,
|
|
131
|
+
zoomScaleExtent: t.zoomScaleExtent,
|
|
132
|
+
disableZoom: !t.zoomEnabled,
|
|
133
|
+
disableDrag: !t.nodeDraggingEnabled,
|
|
134
|
+
events: M
|
|
135
|
+
}, null, 8, ["layoutType", "dagreLayoutSettings", "nodeSize", "nodeLabel", "nodeShape", "nodeFill", "nodeStroke", "nodeStrokeWidth", "linkArrow", "linkLabel", "linkStroke", "linkWidth", "linkCurvature", "zoomScaleExtent", "disableZoom", "disableDrag"])
|
|
136
|
+
];
|
|
137
|
+
}),
|
|
135
138
|
_: 1
|
|
136
139
|
}, 8, ["data", "height", "width", "duration", "padding"]),
|
|
137
140
|
!t.hideLegend && t.legendItems && t.legendItems.length > 0 ? (u(), c("div", {
|
|
138
141
|
key: 0,
|
|
139
142
|
style: f({
|
|
140
143
|
display: "flex",
|
|
141
|
-
justifyContent:
|
|
144
|
+
justifyContent: E.value
|
|
142
145
|
})
|
|
143
146
|
}, [
|
|
144
|
-
k(
|
|
147
|
+
k(d(q), {
|
|
145
148
|
style: f([
|
|
146
149
|
t.legendStyle,
|
|
147
150
|
"display: flex; gap: var(--vis-legend-spacing);"
|
|
148
151
|
]),
|
|
149
|
-
items: t.legendItems.map((
|
|
150
|
-
...
|
|
151
|
-
color: Array.isArray(
|
|
152
|
+
items: t.legendItems.map((r) => ({
|
|
153
|
+
...r,
|
|
154
|
+
color: Array.isArray(r.color) ? r.color[0] : r.color
|
|
152
155
|
}))
|
|
153
156
|
}, null, 8, ["style", "items"])
|
|
154
157
|
], 4)) : s("", !0),
|
|
155
|
-
g("div",
|
|
156
|
-
|
|
158
|
+
g("div", K, [
|
|
159
|
+
d(b).tooltip ? m(o.$slots, "tooltip", {
|
|
157
160
|
key: 0,
|
|
158
161
|
node: i.value
|
|
159
|
-
}) : i.value ?
|
|
160
|
-
g("div",
|
|
161
|
-
g("div",
|
|
162
|
-
t.tooltipContentFormatter ? (u(), c("div",
|
|
162
|
+
}) : i.value ? m(o.$slots, "fallback", { key: 1 }, () => [
|
|
163
|
+
g("div", O, [
|
|
164
|
+
g("div", Q, S(t.tooltipTitleFormatter ? t.tooltipTitleFormatter(i.value) : i.value.label || i.value.id), 1),
|
|
165
|
+
t.tooltipContentFormatter ? (u(), c("div", U, S(t.tooltipContentFormatter(i.value)), 1)) : s("", !0)
|
|
163
166
|
])
|
|
164
167
|
]) : s("", !0)
|
|
165
168
|
], 512)
|
|
@@ -167,5 +170,5 @@ const H = {
|
|
|
167
170
|
}
|
|
168
171
|
});
|
|
169
172
|
export {
|
|
170
|
-
|
|
173
|
+
te as default
|
|
171
174
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DagreGraphProps, GraphNodeDatum, GraphLinkDatum } from './
|
|
1
|
+
import { DagreGraphProps, GraphNodeDatum, GraphLinkDatum } from './DagreGraph';
|
|
2
2
|
declare const _default: <N extends GraphNodeDatum = GraphNodeDatum, L extends GraphLinkDatum = GraphLinkDatum>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
4
|
readonly onNodeClick?: ((node: N, event?: MouseEvent | undefined) => any) | undefined;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { BulletLegendItemInterface,
|
|
1
|
+
import { BulletLegendItemInterface, TooltipConfig } from '../../types';
|
|
2
|
+
import { LegendPosition } from '../../enums';
|
|
3
|
+
export declare enum DonutType {
|
|
4
|
+
Half = "half",
|
|
5
|
+
Full = "full"
|
|
6
|
+
}
|
|
2
7
|
export type DonutChartProps<T> = {
|
|
3
8
|
/**
|
|
4
9
|
* The type of donut chart to render.
|
|
@@ -17,7 +22,7 @@ export type DonutChartProps<T> = {
|
|
|
17
22
|
/**
|
|
18
23
|
* The height of the chart in pixels.
|
|
19
24
|
*/
|
|
20
|
-
height
|
|
25
|
+
height: number;
|
|
21
26
|
/**
|
|
22
27
|
* The radius of the donut in pixels.
|
|
23
28
|
*/
|
|
@@ -61,8 +66,3 @@ export type DonutChartProps<T> = {
|
|
|
61
66
|
*/
|
|
62
67
|
duration?: number;
|
|
63
68
|
};
|
|
64
|
-
declare enum DonutType {
|
|
65
|
-
Half = "half",
|
|
66
|
-
Full = "full"
|
|
67
|
-
}
|
|
68
|
-
export { DonutType };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as L, useSlots as S, useTemplateRef as P, ref as W, computed as s,
|
|
1
|
+
import { defineComponent as L, useSlots as S, useTemplateRef as P, ref as W, computed as s, openBlock as d, createElementBlock as y, normalizeStyle as u, createVNode as a, unref as i, withCtx as b, createBlock as N, createCommentVNode as c, createElementVNode as h, renderSlot as f } from "vue";
|
|
2
2
|
import { Donut as $ } from "@unovis/ts";
|
|
3
|
-
import { DonutType as j } from "./
|
|
3
|
+
import { DonutType as j } from "./DonutChart2.js";
|
|
4
4
|
import z from "../Tooltip.js";
|
|
5
5
|
import { VisSingleContainer as H, VisTooltip as E, VisDonut as F, VisBulletLegend as O } from "@unovis/vue";
|
|
6
|
-
import { LegendPosition as R } from "../../
|
|
6
|
+
import { LegendPosition as R } from "../../enums.js";
|
|
7
7
|
const M = { style: {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
top: "50%",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DonutChartProps } from './
|
|
1
|
+
import { DonutChartProps } from './DonutChart';
|
|
2
2
|
declare const _default: <T extends {}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
4
|
readonly onClick?: ((event: MouseEvent, values?: any) => any) | undefined;
|