vue-chrts 2.1.0-beta-2 → 2.1.0-beta-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/dist/components/AreaChart/AreaChart.js +127 -107
- package/dist/components/AreaChart/types.d.ts +34 -1
- package/dist/components/BarChart/BarChart.js +76 -65
- package/dist/components/BarChart/types.d.ts +9 -1
- package/dist/components/BubbleChart/BubbleChart.js +55 -45
- package/dist/components/BubbleChart/types.d.ts +9 -1
- package/dist/components/DagreGraph/DagreGraph.js +33 -24
- package/dist/components/DagreGraph/types.d.ts +5 -1
- package/dist/components/DonutChart/DonutChart.js +69 -59
- package/dist/components/DonutChart/types.d.ts +14 -2
- package/dist/components/DualChart/DualChart.js +56 -46
- package/dist/components/DualChart/types.d.ts +10 -1
- package/dist/components/GanttChart/GanttChart.js +58 -48
- package/dist/components/GanttChart/types.d.ts +9 -1
- package/dist/components/LineChart/LineChart.js +17 -9
- package/dist/components/Maps/DottedMap/DottedMap.js +170 -0
- package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +52 -0
- package/dist/components/Maps/DottedMap/DottedMap2.js +4 -0
- package/dist/components/Maps/DottedMap/MapLegend.vue.d.ts +6 -0
- package/dist/components/Maps/DottedMap/MapZoomControls.js +44 -0
- package/dist/components/Maps/DottedMap/MapZoomControls.vue.d.ts +13 -0
- package/dist/components/Maps/DottedMap/MapZoomControls2.js +4 -0
- package/dist/components/Maps/DottedMap/core.js +122 -0
- package/dist/components/Maps/DottedMap/core.vue.d.ts +36 -0
- package/dist/components/Maps/DottedMap/core2.js +4 -0
- package/dist/components/Maps/DottedMap/mapUtils.d.ts +49 -0
- package/dist/components/Maps/DottedMap/mapUtils.js +130 -0
- package/dist/components/Maps/DottedMap/pins.d.ts +9 -0
- package/dist/components/Maps/DottedMap/pins.js +58 -0
- package/dist/components/Maps/DottedMap/regions.d.ts +4 -0
- package/dist/components/Maps/DottedMap/regions.js +66 -0
- package/dist/components/Maps/DottedMap/types.d.ts +127 -0
- package/dist/components/Maps/DottedMap/useMapPanZoom.d.ts +22 -0
- package/dist/components/Maps/DottedMap/useMapPanZoom.js +41 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +170 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +30 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap2.js +4 -0
- package/dist/components/Maps/TopoJSONMap/data.d.ts +13 -0
- package/dist/components/Maps/TopoJSONMap/types.d.ts +40 -0
- package/dist/components/Maps/types.d.ts +48 -0
- package/dist/components/SankeyChart/SankeyChart.js +50 -40
- package/dist/components/SankeyChart/SankeyChart.vue.d.ts +1 -1
- package/dist/components/SankeyChart/types.d.ts +14 -1
- package/dist/components/Tooltip.js +32 -27
- package/dist/data/countries.geo.json.js +9 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +27 -23
- package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.1/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +28 -0
- package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +20 -0
- package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +222 -0
- package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +24 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +46 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +31 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +15 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +13 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +9 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +11 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +13 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +14 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +33 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +1278 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +226 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +17 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +22 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +65 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +82 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +94 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +39 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +30 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +12 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +9 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +11 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +128 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +47 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +119 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +43 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +36 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +55 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +52 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +36 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +27 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +48 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +30 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +54 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +27 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +26 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +28 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +31 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +134 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +61 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +19 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +26 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +37 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +48 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +173 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +58 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +28 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +68 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +67 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +104 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +47 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +46 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +33 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +60 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +110 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +22 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +38 -0
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +23 -0
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +30 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +9 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +20 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +171 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +11 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +7 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +104 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +117 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +89 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +73 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +12 -0
- package/dist/types.d.ts +60 -13
- package/dist/types.js +4 -6
- package/dist/utils/geoJsonToGrid.d.ts +14 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +8 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Donut as
|
|
3
|
-
import { DonutType as
|
|
4
|
-
import
|
|
5
|
-
import { VisSingleContainer as
|
|
6
|
-
import { LegendPosition as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as L, useSlots as S, useTemplateRef as P, ref as W, computed as s, createElementBlock as y, openBlock as d, normalizeStyle as u, createVNode as a, createCommentVNode as c, createElementVNode as h, unref as i, withCtx as b, createBlock as N, renderSlot as f } from "vue";
|
|
2
|
+
import { Donut as $ } from "@unovis/ts";
|
|
3
|
+
import { DonutType as j } from "./types.js";
|
|
4
|
+
import z from "../Tooltip.js";
|
|
5
|
+
import { VisSingleContainer as H, VisTooltip as E, VisDonut as F, VisBulletLegend as O } from "@unovis/vue";
|
|
6
|
+
import { LegendPosition as R } from "../../types.js";
|
|
7
|
+
const M = { style: {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
top: "50%",
|
|
10
10
|
left: "50%",
|
|
11
11
|
transform: "translate(-50%, -50%)"
|
|
12
|
-
} },
|
|
12
|
+
} }, U = {
|
|
13
13
|
ref: "slotWrapper",
|
|
14
14
|
style: { display: "none" }
|
|
15
|
-
},
|
|
15
|
+
}, X = /* @__PURE__ */ L({
|
|
16
16
|
__name: "DonutChart",
|
|
17
17
|
props: {
|
|
18
18
|
type: {},
|
|
@@ -21,98 +21,108 @@ const R = { style: {
|
|
|
21
21
|
height: {},
|
|
22
22
|
radius: {},
|
|
23
23
|
hideLegend: { type: Boolean },
|
|
24
|
-
legendPosition: { default:
|
|
24
|
+
legendPosition: { default: R.BottomCenter },
|
|
25
25
|
legendStyle: {},
|
|
26
26
|
categories: {},
|
|
27
27
|
padAngle: {},
|
|
28
|
-
tooltipTitleFormatter: {}
|
|
28
|
+
tooltipTitleFormatter: {},
|
|
29
|
+
hideTooltip: { type: Boolean },
|
|
30
|
+
tooltip: { default: () => ({
|
|
31
|
+
followCursor: !0
|
|
32
|
+
}) },
|
|
33
|
+
duration: { default: 600 }
|
|
29
34
|
},
|
|
30
35
|
emits: ["click"],
|
|
31
|
-
setup(l, { emit:
|
|
32
|
-
const C =
|
|
33
|
-
function
|
|
34
|
-
const o = Object.values(
|
|
35
|
-
return
|
|
36
|
+
setup(l, { emit: v }) {
|
|
37
|
+
const C = v, e = l, w = S(), g = P("slotWrapper"), n = W(), k = (t) => t, T = e.type === j.Half;
|
|
38
|
+
function V(t) {
|
|
39
|
+
const o = Object.values(e.categories)[t.index].name;
|
|
40
|
+
return n.value = {
|
|
36
41
|
label: o,
|
|
37
|
-
[o]:
|
|
38
|
-
},
|
|
42
|
+
[o]: t.data
|
|
43
|
+
}, x();
|
|
39
44
|
}
|
|
40
|
-
function
|
|
41
|
-
return typeof window > "u" ? "" :
|
|
45
|
+
function x() {
|
|
46
|
+
return typeof window > "u" ? "" : g.value ? g.value.innerHTML : "";
|
|
42
47
|
}
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
return
|
|
48
|
+
const B = s(() => e.legendPosition.includes("top")), D = s(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center"), p = (t, o = "#ccc") => t ? Array.isArray(t) ? t[0] || o : t : o, m = s(() => Object.values(e.categories)), A = (t, o) => {
|
|
49
|
+
const r = m.value[o];
|
|
50
|
+
if (r)
|
|
51
|
+
return p(r.color);
|
|
47
52
|
};
|
|
48
|
-
return (
|
|
49
|
-
style:
|
|
53
|
+
return (t, o) => (d(), y("div", {
|
|
54
|
+
style: u({
|
|
50
55
|
display: "flex",
|
|
51
|
-
flexDirection:
|
|
56
|
+
flexDirection: B.value ? "column-reverse" : "column",
|
|
52
57
|
gap: "var(--vis-legend-spacing)"
|
|
53
58
|
}),
|
|
54
|
-
onClick: o[0] || (o[0] = (
|
|
59
|
+
onClick: o[0] || (o[0] = (r) => C("click", r, n.value))
|
|
55
60
|
}, [
|
|
56
|
-
a(
|
|
61
|
+
a(i(H), {
|
|
57
62
|
data: l.data,
|
|
58
63
|
height: l.height,
|
|
64
|
+
duration: l.duration,
|
|
59
65
|
margin: {}
|
|
60
66
|
}, {
|
|
61
67
|
default: b(() => [
|
|
62
|
-
|
|
68
|
+
l.hideTooltip ? c("", !0) : (d(), N(i(E), {
|
|
69
|
+
key: 0,
|
|
63
70
|
"horizontal-shift": 20,
|
|
64
71
|
"vertical-shift": 20,
|
|
72
|
+
followCursor: e.tooltip.followCursor,
|
|
73
|
+
"show-delay": e.tooltip.showDelay,
|
|
74
|
+
"hide-delay": e.tooltip.hideDelay,
|
|
65
75
|
triggers: {
|
|
66
|
-
[
|
|
76
|
+
[i($).selectors.segment]: V
|
|
67
77
|
}
|
|
68
|
-
}, null, 8, ["triggers"]),
|
|
69
|
-
a(
|
|
70
|
-
value:
|
|
78
|
+
}, null, 8, ["followCursor", "show-delay", "hide-delay", "triggers"])),
|
|
79
|
+
a(i(F), {
|
|
80
|
+
value: k,
|
|
71
81
|
"corner-radius": l.radius,
|
|
72
82
|
"arc-width": l.arcWidth ?? 20,
|
|
73
|
-
color:
|
|
74
|
-
"angle-range":
|
|
75
|
-
"pad-angle":
|
|
83
|
+
color: A,
|
|
84
|
+
"angle-range": T ? [-1.5707963267948966, 1.5707963267948966] : [],
|
|
85
|
+
"pad-angle": e.padAngle || 0
|
|
76
86
|
}, null, 8, ["corner-radius", "arc-width", "angle-range", "pad-angle"]),
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
h("div", M, [
|
|
88
|
+
f(t.$slots, "default")
|
|
79
89
|
])
|
|
80
90
|
]),
|
|
81
91
|
_: 3
|
|
82
|
-
}, 8, ["data", "height"]),
|
|
83
|
-
|
|
92
|
+
}, 8, ["data", "height", "duration"]),
|
|
93
|
+
e.hideLegend ? c("", !0) : (d(), y("div", {
|
|
84
94
|
key: 0,
|
|
85
|
-
style:
|
|
95
|
+
style: u({
|
|
86
96
|
display: "flex",
|
|
87
|
-
justifyContent:
|
|
97
|
+
justifyContent: D.value
|
|
88
98
|
})
|
|
89
99
|
}, [
|
|
90
|
-
a(
|
|
91
|
-
style:
|
|
92
|
-
|
|
100
|
+
a(i(O), {
|
|
101
|
+
style: u([
|
|
102
|
+
e.legendStyle,
|
|
93
103
|
"display: flex; gap: var(--vis-legend-spacing);"
|
|
94
104
|
]),
|
|
95
|
-
items:
|
|
96
|
-
...
|
|
97
|
-
color:
|
|
105
|
+
items: m.value.map((r) => ({
|
|
106
|
+
...r,
|
|
107
|
+
color: p(r.color)
|
|
98
108
|
}))
|
|
99
109
|
}, null, 8, ["style", "items"])
|
|
100
110
|
], 4)),
|
|
101
|
-
|
|
102
|
-
|
|
111
|
+
h("div", U, [
|
|
112
|
+
i(w).tooltip ? f(t.$slots, "tooltip", {
|
|
103
113
|
key: 0,
|
|
104
|
-
values:
|
|
105
|
-
}) :
|
|
106
|
-
a(
|
|
107
|
-
data:
|
|
108
|
-
categories:
|
|
109
|
-
"title-formatter":
|
|
114
|
+
values: n.value
|
|
115
|
+
}) : n.value ? f(t.$slots, "fallback", { key: 1 }, () => [
|
|
116
|
+
a(z, {
|
|
117
|
+
data: n.value,
|
|
118
|
+
categories: e.categories,
|
|
119
|
+
"title-formatter": e.tooltipTitleFormatter
|
|
110
120
|
}, null, 8, ["data", "categories", "title-formatter"])
|
|
111
|
-
]) :
|
|
121
|
+
]) : c("", !0)
|
|
112
122
|
], 512)
|
|
113
123
|
], 4));
|
|
114
124
|
}
|
|
115
125
|
});
|
|
116
126
|
export {
|
|
117
|
-
|
|
127
|
+
X as default
|
|
118
128
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BulletLegendItemInterface, LegendPosition } from '../../types';
|
|
1
|
+
import { BulletLegendItemInterface, LegendPosition, TooltipConfig } from '../../types';
|
|
2
2
|
export type DonutChartProps<T> = {
|
|
3
3
|
/**
|
|
4
4
|
* The type of donut chart to render.
|
|
@@ -17,7 +17,7 @@ export type DonutChartProps<T> = {
|
|
|
17
17
|
/**
|
|
18
18
|
* The height of the chart in pixels.
|
|
19
19
|
*/
|
|
20
|
-
height
|
|
20
|
+
height?: number;
|
|
21
21
|
/**
|
|
22
22
|
* The radius of the donut in pixels.
|
|
23
23
|
*/
|
|
@@ -48,6 +48,18 @@ export type DonutChartProps<T> = {
|
|
|
48
48
|
* Use custom formatter for tooltip titles
|
|
49
49
|
*/
|
|
50
50
|
tooltipTitleFormatter?: (data: T) => string | number;
|
|
51
|
+
/**
|
|
52
|
+
* If `true`, hides the chart tooltip.
|
|
53
|
+
*/
|
|
54
|
+
hideTooltip?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Configuration object for the chart tooltip.
|
|
57
|
+
*/
|
|
58
|
+
tooltip?: TooltipConfig;
|
|
59
|
+
/**
|
|
60
|
+
* Animation duration in milliseconds.
|
|
61
|
+
*/
|
|
62
|
+
duration?: number;
|
|
51
63
|
};
|
|
52
64
|
declare enum DonutType {
|
|
53
65
|
Half = "half",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as N, useSlots as W, useTemplateRef as E, ref as G, computed as c, createElementBlock as m, openBlock as
|
|
2
|
-
import { Orientation as y, CurveType as
|
|
1
|
+
import { defineComponent as N, useSlots as W, useTemplateRef as E, ref as G, computed as c, createElementBlock as m, openBlock as r, normalizeStyle as f, createVNode as x, createCommentVNode as s, createElementVNode as z, unref as a, withCtx as H, createBlock as d, Fragment as X, renderList as j, mergeProps as k, renderSlot as A } from "vue";
|
|
2
|
+
import { Orientation as y, CurveType as p, Position as L, StackedBar as q, GroupedBar as $ } from "@unovis/ts";
|
|
3
3
|
import { VisXYContainer as R, VisTooltip as U, VisGroupedBar as I, VisStackedBar as J, VisLine as K, VisAxis as B, VisCrosshair as Q, VisBulletLegend as Z } from "@unovis/vue";
|
|
4
4
|
import _ from "../Tooltip.js";
|
|
5
5
|
import { LegendPosition as ee } from "../../types.js";
|
|
@@ -27,7 +27,7 @@ const te = {
|
|
|
27
27
|
xFormatter: {},
|
|
28
28
|
yFormatter: {},
|
|
29
29
|
tooltipTitleFormatter: {},
|
|
30
|
-
curveType: { default:
|
|
30
|
+
curveType: { default: p.MonotoneX },
|
|
31
31
|
lineWidth: { default: 2 },
|
|
32
32
|
xNumTicks: {},
|
|
33
33
|
xExplicitTicks: {},
|
|
@@ -54,74 +54,82 @@ const te = {
|
|
|
54
54
|
groupPadding: { default: 0 },
|
|
55
55
|
barPadding: { default: 0.2 },
|
|
56
56
|
radius: {},
|
|
57
|
-
orientation: { default: y.Vertical }
|
|
57
|
+
orientation: { default: y.Vertical },
|
|
58
|
+
duration: { default: 600 },
|
|
59
|
+
tooltip: { default: () => ({
|
|
60
|
+
followCursor: !0
|
|
61
|
+
}) }
|
|
58
62
|
},
|
|
59
63
|
emits: ["click"],
|
|
60
64
|
setup(e, { emit: Y }) {
|
|
61
|
-
const
|
|
65
|
+
const w = Y, t = e, P = W(), g = E("slotWrapper"), u = G();
|
|
62
66
|
if (!t.barYAxis || t.barYAxis.length === 0)
|
|
63
67
|
throw console.error("[DualChart] barYAxis prop is required and must contain at least one field key"), new Error("DualChart: 'barYAxis' is required and must contain at least one field key. Provide an array of property keys from your data type (e.g., ['revenue', 'costs'])");
|
|
64
68
|
if (!t.lineYAxis || t.lineYAxis.length === 0)
|
|
65
69
|
throw console.error("[DualChart] lineYAxis prop is required and must contain at least one field key"), new Error("DualChart: 'lineYAxis' is required and must contain at least one field key. Provide an array of property keys from your data type (e.g., ['profit', 'target'])");
|
|
66
|
-
const h = c(() => t.barYAxis.map((n) => (l) => l[n])),
|
|
70
|
+
const h = c(() => t.barYAxis.map((n) => (l) => l[n])), V = c(() => t.lineYAxis.map((n) => (l) => l[n])), v = (n, l) => {
|
|
67
71
|
var i;
|
|
68
72
|
return (i = Object.values(t.barCategories)[l]) == null ? void 0 : i.color;
|
|
69
|
-
},
|
|
73
|
+
}, C = c(() => ({
|
|
70
74
|
...t.barCategories,
|
|
71
75
|
...t.lineCategories
|
|
72
|
-
})),
|
|
73
|
-
function
|
|
74
|
-
|
|
76
|
+
})), D = c(() => t.legendPosition.startsWith("top")), F = c(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center");
|
|
77
|
+
function b(n) {
|
|
78
|
+
u.value = n;
|
|
75
79
|
}
|
|
76
80
|
function M(n) {
|
|
77
81
|
return typeof window > "u" ? "" : g.value ? g.value.innerHTML : "";
|
|
78
82
|
}
|
|
79
83
|
function O(n) {
|
|
80
|
-
return
|
|
84
|
+
return u.value = n, M();
|
|
81
85
|
}
|
|
82
|
-
return (n, l) => (
|
|
86
|
+
return (n, l) => (r(), m("div", {
|
|
83
87
|
style: f({
|
|
84
88
|
display: "flex",
|
|
85
|
-
flexDirection:
|
|
89
|
+
flexDirection: D.value ? "column-reverse" : "column",
|
|
86
90
|
gap: "var(--vis-legend-spacing)"
|
|
87
91
|
}),
|
|
88
|
-
onClick: l[0] || (l[0] = (i) =>
|
|
92
|
+
onClick: l[0] || (l[0] = (i) => w("click", i, u.value))
|
|
89
93
|
}, [
|
|
90
94
|
x(a(R), {
|
|
91
95
|
padding: e.padding,
|
|
92
96
|
height: e.height,
|
|
97
|
+
duration: e.duration,
|
|
93
98
|
data: e.data
|
|
94
99
|
}, {
|
|
95
100
|
default: H(() => [
|
|
96
|
-
e.hideTooltip ?
|
|
101
|
+
e.hideTooltip ? s("", !0) : (r(), d(a(U), {
|
|
97
102
|
key: 0,
|
|
103
|
+
followCursor: t.tooltip.followCursor,
|
|
104
|
+
"show-delay": t.tooltip.showDelay,
|
|
105
|
+
"hide-delay": t.tooltip.hideDelay,
|
|
98
106
|
triggers: {
|
|
99
107
|
[a($).selectors.bar]: (i) => {
|
|
100
|
-
var
|
|
101
|
-
return
|
|
108
|
+
var o;
|
|
109
|
+
return b(i), i ? (o = g.value) == null ? void 0 : o.innerHTML : "";
|
|
102
110
|
},
|
|
103
111
|
[a(q).selectors.bar]: (i) => {
|
|
104
|
-
var
|
|
105
|
-
return
|
|
112
|
+
var o;
|
|
113
|
+
return b(i), i ? (o = g.value) == null ? void 0 : o.innerHTML : "";
|
|
106
114
|
}
|
|
107
115
|
},
|
|
108
116
|
"horizontal-placement": a(L).Right,
|
|
109
117
|
"vertical-placement": a(L).Top
|
|
110
|
-
}, null, 8, ["triggers", "horizontal-placement", "vertical-placement"])),
|
|
111
|
-
e.stacked ? (
|
|
118
|
+
}, null, 8, ["followCursor", "show-delay", "hide-delay", "triggers", "horizontal-placement", "vertical-placement"])),
|
|
119
|
+
e.stacked ? (r(), d(a(J), {
|
|
112
120
|
key: 2,
|
|
113
121
|
data: e.data,
|
|
114
|
-
x: (i,
|
|
122
|
+
x: (i, o) => o,
|
|
115
123
|
y: h.value,
|
|
116
124
|
color: v,
|
|
117
125
|
"rounded-corners": e.radius ?? 0,
|
|
118
126
|
"group-padding": e.groupPadding ?? 0,
|
|
119
127
|
"bar-padding": e.barPadding ?? 0.2,
|
|
120
128
|
orientation: e.orientation ?? a(y).Vertical
|
|
121
|
-
}, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (
|
|
129
|
+
}, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (r(), d(a(I), {
|
|
122
130
|
key: 1,
|
|
123
131
|
data: e.data,
|
|
124
|
-
x: (i,
|
|
132
|
+
x: (i, o) => o,
|
|
125
133
|
y: h.value,
|
|
126
134
|
color: v,
|
|
127
135
|
"rounded-corners": e.radius ?? 0,
|
|
@@ -129,19 +137,19 @@ const te = {
|
|
|
129
137
|
"bar-padding": e.barPadding ?? 0.2,
|
|
130
138
|
orientation: e.orientation ?? a(y).Vertical
|
|
131
139
|
}, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])),
|
|
132
|
-
(
|
|
140
|
+
(r(!0), m(X, null, j(V.value, (i, o) => {
|
|
133
141
|
var T;
|
|
134
|
-
return
|
|
135
|
-
key: `line-${
|
|
142
|
+
return r(), d(a(K), {
|
|
143
|
+
key: `line-${o}`,
|
|
136
144
|
data: e.data,
|
|
137
145
|
x: (ie, S) => S,
|
|
138
146
|
y: i,
|
|
139
|
-
color: (T = Object.values(t.lineCategories)[
|
|
140
|
-
"curve-type": e.curveType ?? a(
|
|
147
|
+
color: (T = Object.values(t.lineCategories)[o]) == null ? void 0 : T.color,
|
|
148
|
+
"curve-type": e.curveType ?? a(p).MonotoneX,
|
|
141
149
|
"line-width": e.lineWidth
|
|
142
150
|
}, null, 8, ["data", "x", "y", "color", "curve-type", "line-width"]);
|
|
143
151
|
}), 128)),
|
|
144
|
-
e.hideXAxis ?
|
|
152
|
+
e.hideXAxis ? s("", !0) : (r(), d(a(B), k({
|
|
145
153
|
key: 3,
|
|
146
154
|
type: "x",
|
|
147
155
|
"tick-format": e.xFormatter,
|
|
@@ -151,9 +159,10 @@ const te = {
|
|
|
151
159
|
"tick-line": e.xTickLine,
|
|
152
160
|
"num-ticks": e.xNumTicks,
|
|
153
161
|
"tick-values": e.xExplicitTicks,
|
|
154
|
-
minMaxTicksOnly: e.minMaxTicksOnly
|
|
155
|
-
|
|
156
|
-
e.
|
|
162
|
+
minMaxTicksOnly: e.minMaxTicksOnly,
|
|
163
|
+
duration: e.duration
|
|
164
|
+
}, e.xAxisConfig), null, 16, ["tick-format", "label", "grid-line", "domain-line", "tick-line", "num-ticks", "tick-values", "minMaxTicksOnly", "duration"])),
|
|
165
|
+
e.hideYAxis ? s("", !0) : (r(), d(a(B), k({
|
|
157
166
|
key: 4,
|
|
158
167
|
type: "y",
|
|
159
168
|
label: e.yLabel,
|
|
@@ -161,17 +170,18 @@ const te = {
|
|
|
161
170
|
"domain-line": !!e.yDomainLine,
|
|
162
171
|
"tick-format": e.yFormatter,
|
|
163
172
|
"num-ticks": e.yNumTicks,
|
|
164
|
-
"tick-line": e.yTickLine
|
|
165
|
-
|
|
166
|
-
e.
|
|
173
|
+
"tick-line": e.yTickLine,
|
|
174
|
+
duration: e.duration
|
|
175
|
+
}, e.yAxisConfig), null, 16, ["label", "grid-line", "domain-line", "tick-format", "num-ticks", "tick-line", "duration"])),
|
|
176
|
+
e.hideTooltip ? s("", !0) : (r(), d(a(Q), k({ key: 5 }, e.crosshairConfig, { template: O }), null, 16))
|
|
167
177
|
]),
|
|
168
178
|
_: 1
|
|
169
|
-
}, 8, ["padding", "height", "data"]),
|
|
170
|
-
t.hideLegend ?
|
|
179
|
+
}, 8, ["padding", "height", "duration", "data"]),
|
|
180
|
+
t.hideLegend ? s("", !0) : (r(), m("div", {
|
|
171
181
|
key: 0,
|
|
172
182
|
style: f({
|
|
173
183
|
display: "flex",
|
|
174
|
-
justifyContent:
|
|
184
|
+
justifyContent: F.value
|
|
175
185
|
})
|
|
176
186
|
}, [
|
|
177
187
|
x(a(Z), {
|
|
@@ -179,24 +189,24 @@ const te = {
|
|
|
179
189
|
t.legendStyle,
|
|
180
190
|
"display: flex; gap: var(--vis-legend-spacing);"
|
|
181
191
|
]),
|
|
182
|
-
items: Object.values(
|
|
192
|
+
items: Object.values(C.value).map((i) => ({
|
|
183
193
|
...i,
|
|
184
194
|
color: Array.isArray(i.color) ? i.color[0] : i.color
|
|
185
195
|
}))
|
|
186
196
|
}, null, 8, ["style", "items"])
|
|
187
197
|
], 4)),
|
|
188
198
|
z("div", te, [
|
|
189
|
-
a(
|
|
199
|
+
a(P).tooltip ? A(n.$slots, "tooltip", {
|
|
190
200
|
key: 0,
|
|
191
|
-
values:
|
|
192
|
-
}) :
|
|
201
|
+
values: u.value
|
|
202
|
+
}) : u.value ? A(n.$slots, "fallback", { key: 1 }, () => [
|
|
193
203
|
x(_, {
|
|
194
|
-
data:
|
|
195
|
-
categories:
|
|
204
|
+
data: u.value,
|
|
205
|
+
categories: C.value,
|
|
196
206
|
"title-formatter": t.tooltipTitleFormatter,
|
|
197
207
|
yFormatter: t.orientation === a(y).Horizontal ? t.xFormatter : t.yFormatter
|
|
198
208
|
}, null, 8, ["data", "categories", "title-formatter", "yFormatter"])
|
|
199
|
-
]) :
|
|
209
|
+
]) : s("", !0)
|
|
200
210
|
], 512)
|
|
201
211
|
], 4));
|
|
202
212
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { axisFormatter, CrosshairConfig, LegendPosition, AxisConfig, BulletLegendItemInterface, Orientation,
|
|
1
|
+
import { axisFormatter, CrosshairConfig, LegendPosition, AxisConfig, BulletLegendItemInterface, Orientation, TooltipConfig } from '../../types';
|
|
2
|
+
import { CurveType } from '@unovis/ts';
|
|
2
3
|
export interface DualChartProps<T> {
|
|
3
4
|
/**
|
|
4
5
|
* The data to be displayed in the dual chart.
|
|
@@ -183,4 +184,12 @@ export interface DualChartProps<T> {
|
|
|
183
184
|
* See `Orientation` for available options.
|
|
184
185
|
*/
|
|
185
186
|
orientation?: Orientation;
|
|
187
|
+
/**
|
|
188
|
+
* Animation duration in milliseconds for the chart components.
|
|
189
|
+
*/
|
|
190
|
+
duration?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Configuration object for the chart tooltip.
|
|
193
|
+
*/
|
|
194
|
+
tooltip?: TooltipConfig;
|
|
186
195
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as W, useSlots as B, useTemplateRef as V, ref as A, computed as d, createElementBlock as p, openBlock as c, normalizeStyle as u, createVNode as n, createCommentVNode as g, createElementVNode as F, unref as i, withCtx as H, createBlock as P, mergeProps as S, renderSlot as y } from "vue";
|
|
2
2
|
import { Timeline as x } from "@unovis/ts";
|
|
3
|
-
import { dateFormatter as
|
|
3
|
+
import { dateFormatter as D } from "../../utils.js";
|
|
4
4
|
import N from "../Tooltip.js";
|
|
5
|
-
import { VisXYContainer as j, VisTimeline as O, VisTooltip as $, VisAxis as
|
|
6
|
-
import { LegendPosition as
|
|
7
|
-
const
|
|
5
|
+
import { VisXYContainer as j, VisTimeline as O, VisTooltip as $, VisAxis as G, VisBulletLegend as M } from "@unovis/vue";
|
|
6
|
+
import { LegendPosition as E } from "../../types.js";
|
|
7
|
+
const J = /* @__PURE__ */ W({
|
|
8
8
|
__name: "GanttChart",
|
|
9
9
|
props: {
|
|
10
10
|
data: {},
|
|
@@ -23,7 +23,7 @@ const I = /* @__PURE__ */ B({
|
|
|
23
23
|
crosshairConfig: {},
|
|
24
24
|
lineWidth: { default: 12 },
|
|
25
25
|
rowHeight: { default: 24 },
|
|
26
|
-
legendPosition: { default:
|
|
26
|
+
legendPosition: { default: E.TopRight },
|
|
27
27
|
legendStyle: {},
|
|
28
28
|
hideLegend: { type: Boolean },
|
|
29
29
|
xTickLine: { type: Boolean },
|
|
@@ -33,81 +33,91 @@ const I = /* @__PURE__ */ B({
|
|
|
33
33
|
xGridLine: { type: Boolean },
|
|
34
34
|
xDomainLine: { type: Boolean },
|
|
35
35
|
xAxisConfig: {},
|
|
36
|
-
yAxisConfig: {}
|
|
36
|
+
yAxisConfig: {},
|
|
37
|
+
duration: { default: 600 },
|
|
38
|
+
tooltip: { default: () => ({
|
|
39
|
+
followCursor: !0
|
|
40
|
+
}) }
|
|
37
41
|
},
|
|
38
42
|
emits: ["click", "scroll", "labelHover"],
|
|
39
|
-
setup(
|
|
40
|
-
const e =
|
|
43
|
+
setup(l, { emit: k }) {
|
|
44
|
+
const e = l, s = k, T = B(), m = V("slotWrapper"), r = A(), v = d(() => e.legendPosition.startsWith("top")), b = d(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center");
|
|
41
45
|
x.selectors.label + "";
|
|
42
|
-
function
|
|
43
|
-
r.value =
|
|
46
|
+
function f(o) {
|
|
47
|
+
r.value = o, s("labelHover", o);
|
|
44
48
|
}
|
|
45
|
-
function
|
|
46
|
-
s("click", t, { index: a, item:
|
|
49
|
+
function C(o, a, t) {
|
|
50
|
+
s("click", t, { index: a, item: o });
|
|
47
51
|
}
|
|
48
|
-
function
|
|
49
|
-
s("scroll",
|
|
52
|
+
function L(o) {
|
|
53
|
+
s("scroll", o.deltaY);
|
|
50
54
|
}
|
|
51
|
-
const
|
|
52
|
-
const
|
|
55
|
+
const w = d(() => {
|
|
56
|
+
const o = Object.values(e.categories).map(
|
|
53
57
|
(a, t) => `var(--vis-color${t})`
|
|
54
58
|
);
|
|
55
59
|
return Object.values(e.categories).map(
|
|
56
|
-
(a, t) => a.color ??
|
|
60
|
+
(a, t) => a.color ?? o[t]
|
|
57
61
|
);
|
|
58
62
|
});
|
|
59
|
-
return (
|
|
60
|
-
style:
|
|
63
|
+
return (o, a) => (c(), p("div", {
|
|
64
|
+
style: u({
|
|
61
65
|
display: "flex",
|
|
62
66
|
flexDirection: v.value ? "column-reverse" : "column",
|
|
63
67
|
gap: "var(--vis-legend-spacing)"
|
|
64
68
|
})
|
|
65
69
|
}, [
|
|
66
|
-
n(
|
|
70
|
+
n(i(j), {
|
|
67
71
|
data: e.data,
|
|
68
72
|
height: e.height,
|
|
69
|
-
|
|
73
|
+
duration: l.duration,
|
|
74
|
+
onWheel: L
|
|
70
75
|
}, {
|
|
71
76
|
default: H(() => [
|
|
72
|
-
n(
|
|
77
|
+
n(i(O), {
|
|
73
78
|
x: e.x,
|
|
74
79
|
length: e.length,
|
|
75
80
|
lineWidth: e.lineWidth,
|
|
76
81
|
rowHeight: e.rowHeight,
|
|
77
82
|
type: e.type,
|
|
78
|
-
color:
|
|
83
|
+
color: w.value,
|
|
79
84
|
labelWidth: e.labelWidth,
|
|
80
85
|
showLabels: e.showLabels,
|
|
81
|
-
onClick:
|
|
86
|
+
onClick: C
|
|
82
87
|
}, null, 8, ["x", "length", "lineWidth", "rowHeight", "type", "color", "labelWidth", "showLabels"]),
|
|
83
|
-
|
|
88
|
+
l.hideTooltip ? g("", !0) : (c(), P(i($), {
|
|
89
|
+
key: 0,
|
|
90
|
+
followCursor: e.tooltip.followCursor,
|
|
91
|
+
"show-delay": e.tooltip.showDelay,
|
|
92
|
+
"hide-delay": e.tooltip.hideDelay,
|
|
84
93
|
triggers: {
|
|
85
|
-
[
|
|
86
|
-
var
|
|
87
|
-
return
|
|
94
|
+
[i(x).selectors.label]: (t) => {
|
|
95
|
+
var h;
|
|
96
|
+
return f(t), t ? (h = m.value) == null ? void 0 : h.innerHTML : "";
|
|
88
97
|
}
|
|
89
98
|
}
|
|
90
|
-
}, null, 8, ["triggers"]),
|
|
91
|
-
n(
|
|
99
|
+
}, null, 8, ["followCursor", "show-delay", "hide-delay", "triggers"])),
|
|
100
|
+
n(i(G), S({
|
|
92
101
|
type: "x",
|
|
93
|
-
tickFormat:
|
|
94
|
-
numTicks:
|
|
95
|
-
"tick-line":
|
|
96
|
-
"grid-line":
|
|
97
|
-
"domain-line":
|
|
98
|
-
|
|
102
|
+
tickFormat: l.xTickFormat || i(D),
|
|
103
|
+
numTicks: l.xNumTicks,
|
|
104
|
+
"tick-line": l.xTickLine,
|
|
105
|
+
"grid-line": l.xGridLine,
|
|
106
|
+
"domain-line": l.xDomainLine,
|
|
107
|
+
duration: l.duration
|
|
108
|
+
}, l.xAxisConfig), null, 16, ["tickFormat", "numTicks", "tick-line", "grid-line", "domain-line", "duration"])
|
|
99
109
|
]),
|
|
100
110
|
_: 1
|
|
101
|
-
}, 8, ["data", "height"]),
|
|
102
|
-
e.hideLegend ?
|
|
111
|
+
}, 8, ["data", "height", "duration"]),
|
|
112
|
+
e.hideLegend ? g("", !0) : (c(), p("div", {
|
|
103
113
|
key: 0,
|
|
104
|
-
style:
|
|
114
|
+
style: u({
|
|
105
115
|
display: "flex",
|
|
106
116
|
justifyContent: b.value
|
|
107
117
|
})
|
|
108
118
|
}, [
|
|
109
|
-
n(
|
|
110
|
-
style:
|
|
119
|
+
n(i(M), {
|
|
120
|
+
style: u([
|
|
111
121
|
e.legendStyle,
|
|
112
122
|
"display: flex; gap: var(--vis-legend-spacing);"
|
|
113
123
|
]),
|
|
@@ -119,23 +129,23 @@ const I = /* @__PURE__ */ B({
|
|
|
119
129
|
], 4)),
|
|
120
130
|
F("div", {
|
|
121
131
|
ref_key: "slotWrapper",
|
|
122
|
-
ref:
|
|
132
|
+
ref: m,
|
|
123
133
|
style: { display: "none" }
|
|
124
134
|
}, [
|
|
125
|
-
|
|
135
|
+
i(T).labelTooltip ? y(o.$slots, "labelTooltip", {
|
|
126
136
|
key: 0,
|
|
127
137
|
values: r.value
|
|
128
|
-
}) : r.value ? y(
|
|
138
|
+
}) : r.value ? y(o.$slots, "fallback", { key: 1 }, () => [
|
|
129
139
|
n(N, {
|
|
130
140
|
data: r.value,
|
|
131
141
|
"title-formatter": e.tooltipTitleFormatter,
|
|
132
|
-
categories:
|
|
142
|
+
categories: l.categories
|
|
133
143
|
}, null, 8, ["data", "title-formatter", "categories"])
|
|
134
|
-
]) :
|
|
144
|
+
]) : g("", !0)
|
|
135
145
|
], 512)
|
|
136
146
|
], 4));
|
|
137
147
|
}
|
|
138
148
|
});
|
|
139
149
|
export {
|
|
140
|
-
|
|
150
|
+
J as default
|
|
141
151
|
};
|