@adyen/lume-vue3 1.5.3 → 1.6.0
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/@types/components/charts/lume-alluvial-diagram/defaults.d.ts +3 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/defaults.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/index.d.ts +2 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/index.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts +125 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-bar-chart/index.d.ts +2 -0
- package/dist/@types/components/charts/lume-bar-chart/index.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts +179 -0
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/defaults.d.ts +26 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/defaults.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/index.d.ts +2 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/index.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts +163 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-line-chart/defaults.d.ts +3 -0
- package/dist/@types/components/charts/lume-line-chart/defaults.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-line-chart/index.d.ts +2 -0
- package/dist/@types/components/charts/lume-line-chart/index.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts +163 -0
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-single-bar-chart/defaults.d.ts +22 -0
- package/dist/@types/components/charts/lume-single-bar-chart/defaults.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-single-bar-chart/index.d.ts +2 -0
- package/dist/@types/components/charts/lume-single-bar-chart/index.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts +163 -0
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-sparkline-chart/composables/sparkline-area.d.ts +7 -0
- package/dist/@types/components/charts/lume-sparkline-chart/composables/sparkline-area.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-sparkline-chart/defaults.d.ts +3 -0
- package/dist/@types/components/charts/lume-sparkline-chart/defaults.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-sparkline-chart/index.d.ts +2 -0
- package/dist/@types/components/charts/lume-sparkline-chart/index.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts +120 -0
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/defaults.d.ts +26 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/defaults.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/index.d.ts +2 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/index.d.ts.map +1 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts +163 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts.map +1 -0
- package/dist/@types/components/core/index.d.ts +9 -0
- package/dist/@types/components/core/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/components/lume-tick/index.d.ts +2 -0
- package/dist/@types/components/core/lume-axis/components/lume-tick/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/components/lume-tick/lume-tick.vue.d.ts +82 -0
- package/dist/@types/components/core/lume-axis/components/lume-tick/lume-tick.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/composables/index.d.ts +8 -0
- package/dist/@types/components/core/lume-axis/composables/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/composables/lume-skip.d.ts +15 -0
- package/dist/@types/components/core/lume-axis/composables/lume-skip.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/composables/x-band-scale-axis.d.ts +4 -0
- package/dist/@types/components/core/lume-axis/composables/x-band-scale-axis.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/composables/x-linear-scale-axis.d.ts +4 -0
- package/dist/@types/components/core/lume-axis/composables/x-linear-scale-axis.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/composables/y-band-scale-axis.d.ts +4 -0
- package/dist/@types/components/core/lume-axis/composables/y-band-scale-axis.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/composables/y-linear-scale-axis.d.ts +4 -0
- package/dist/@types/components/core/lume-axis/composables/y-linear-scale-axis.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/defaults.d.ts +4 -0
- package/dist/@types/components/core/lume-axis/defaults.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/index.d.ts +2 -0
- package/dist/@types/components/core/lume-axis/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/lume-axis.vue.d.ts +113 -0
- package/dist/@types/components/core/lume-axis/lume-axis.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-axis/types.d.ts +14 -0
- package/dist/@types/components/core/lume-axis/types.d.ts.map +1 -0
- package/dist/@types/components/core/lume-bar/composables/bar-sizing.d.ts +20 -0
- package/dist/@types/components/core/lume-bar/composables/bar-sizing.d.ts.map +1 -0
- package/dist/@types/components/core/lume-bar/composables/bar-transition.d.ts +7 -0
- package/dist/@types/components/core/lume-bar/composables/bar-transition.d.ts.map +1 -0
- package/dist/@types/components/core/lume-bar/index.d.ts +2 -0
- package/dist/@types/components/core/lume-bar/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-bar/lume-bar.vue.d.ts +86 -0
- package/dist/@types/components/core/lume-bar/lume-bar.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-chart/index.d.ts +2 -0
- package/dist/@types/components/core/lume-chart/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts +239 -0
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-chart-container/index.d.ts +2 -0
- package/dist/@types/components/core/lume-chart-container/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts +70 -0
- package/dist/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-chart-legend/index.d.ts +2 -0
- package/dist/@types/components/core/lume-chart-legend/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-chart-legend/lume-chart-legend.vue.d.ts +27 -0
- package/dist/@types/components/core/lume-chart-legend/lume-chart-legend.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-line/index.d.ts +2 -0
- package/dist/@types/components/core/lume-line/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-line/lume-line.vue.d.ts +73 -0
- package/dist/@types/components/core/lume-line/lume-line.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-point/index.d.ts +2 -0
- package/dist/@types/components/core/lume-point/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-point/lume-point.vue.d.ts +54 -0
- package/dist/@types/components/core/lume-point/lume-point.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-item/index.d.ts +2 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-item/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-item/lume-tooltip-item.vue.d.ts +23 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-item/lume-tooltip-item.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-summary/index.d.ts +2 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-summary/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-summary/lume-tooltip-summary.vue.d.ts +11 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-summary/lume-tooltip-summary.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-title/index.d.ts +2 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-title/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-title/lume-tooltip-title.vue.d.ts +10 -0
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-title/lume-tooltip-title.vue.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/index.d.ts +2 -0
- package/dist/@types/components/core/lume-tooltip/index.d.ts.map +1 -0
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts +116 -0
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/index.d.ts +5 -0
- package/dist/@types/components/groups/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-label/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-label/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-label/lume-alluvial-node-label.vue.d.ts +44 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-label/lume-alluvial-node-label.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-value/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-value/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-value/lume-alluvial-node-value.vue.d.ts +22 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-value/lume-alluvial-node-value.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-extents.d.ts +12 -0
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-extents.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-graph.d.ts +9 -0
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-graph.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-hover.d.ts +166 -0
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-hover.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/constants.d.ts +6 -0
- package/dist/@types/components/groups/lume-alluvial-group/constants.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/helpers.d.ts +30 -0
- package/dist/@types/components/groups/lume-alluvial-group/helpers.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-alluvial-group/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts +267 -0
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-bar-group/composables/bar-mixin.d.ts +29 -0
- package/dist/@types/components/groups/lume-bar-group/composables/bar-mixin.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-bar-group/composables/grouped-mixin.d.ts +16 -0
- package/dist/@types/components/groups/lume-bar-group/composables/grouped-mixin.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-bar-group/composables/single-mixin.d.ts +16 -0
- package/dist/@types/components/groups/lume-bar-group/composables/single-mixin.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-bar-group/composables/stacked-mixin.d.ts +22 -0
- package/dist/@types/components/groups/lume-bar-group/composables/stacked-mixin.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-bar-group/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-bar-group/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-bar-group/lume-bar-group.vue.d.ts +129 -0
- package/dist/@types/components/groups/lume-bar-group/lume-bar-group.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-line-group/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-line-group/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-line-group/lume-line-group.vue.d.ts +137 -0
- package/dist/@types/components/groups/lume-line-group/lume-line-group.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-overlay-group/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-overlay-group/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-overlay-group/lume-overlay-group.vue.d.ts +117 -0
- package/dist/@types/components/groups/lume-overlay-group/lume-overlay-group.vue.d.ts.map +1 -0
- package/dist/@types/components/index.d.ts +25 -0
- package/dist/@types/components/index.d.ts.map +1 -0
- package/dist/@types/composables/base.d.ts +36 -0
- package/dist/@types/composables/base.d.ts.map +1 -0
- package/dist/@types/composables/events.d.ts +6 -0
- package/dist/@types/composables/events.d.ts.map +1 -0
- package/dist/@types/composables/format.d.ts +6 -0
- package/dist/@types/composables/format.d.ts.map +1 -0
- package/dist/@types/composables/group-props.d.ts +54 -0
- package/dist/@types/composables/group-props.d.ts.map +1 -0
- package/dist/@types/composables/index.d.ts +9 -0
- package/dist/@types/composables/index.d.ts.map +1 -0
- package/dist/@types/composables/line-null-values.d.ts +15 -0
- package/dist/@types/composables/line-null-values.d.ts.map +1 -0
- package/dist/@types/composables/line-values.d.ts +14 -0
- package/dist/@types/composables/line-values.d.ts.map +1 -0
- package/dist/@types/composables/negative-values.d.ts +16 -0
- package/dist/@types/composables/negative-values.d.ts.map +1 -0
- package/dist/@types/composables/options.d.ts +83 -0
- package/dist/@types/composables/options.d.ts.map +1 -0
- package/dist/@types/composables/props.d.ts +77 -0
- package/dist/@types/composables/props.d.ts.map +1 -0
- package/dist/@types/composables/resize.d.ts +17 -0
- package/dist/@types/composables/resize.d.ts.map +1 -0
- package/dist/@types/composables/scales.d.ts +54 -0
- package/dist/@types/composables/scales.d.ts.map +1 -0
- package/dist/@types/composables/tooltip.d.ts +33 -0
- package/dist/@types/composables/tooltip.d.ts.map +1 -0
- package/dist/@types/docs/storybook-data/alluvial-data.d.ts +171 -0
- package/dist/@types/docs/storybook-data/alluvial-data.d.ts.map +1 -0
- package/dist/@types/docs/storybook-data/base-data.d.ts +72 -0
- package/dist/@types/docs/storybook-data/base-data.d.ts.map +1 -0
- package/dist/@types/docs/storybook-data/sparkline-data.d.ts +30 -0
- package/dist/@types/docs/storybook-data/sparkline-data.d.ts.map +1 -0
- package/dist/@types/docs/storybook-helpers.d.ts +37 -0
- package/dist/@types/docs/storybook-helpers.d.ts.map +1 -0
- package/dist/@types/index.d.ts +2 -0
- package/dist/@types/index.d.ts.map +1 -0
- package/dist/@types/plugin.d.ts +4 -0
- package/dist/@types/plugin.d.ts.map +1 -0
- package/dist/@types/types/alluvial.d.ts +79 -0
- package/dist/@types/types/alluvial.d.ts.map +1 -0
- package/dist/@types/types/dataset.d.ts +32 -0
- package/dist/@types/types/dataset.d.ts.map +1 -0
- package/dist/@types/types/events.d.ts +79 -0
- package/dist/@types/types/events.d.ts.map +1 -0
- package/dist/@types/types/size.d.ts +7 -0
- package/dist/@types/types/size.d.ts.map +1 -0
- package/dist/@types/utils/colors.d.ts +6 -0
- package/dist/@types/utils/colors.d.ts.map +1 -0
- package/dist/@types/utils/constants.d.ts +109 -0
- package/dist/@types/utils/constants.d.ts.map +1 -0
- package/dist/@types/utils/errors.d.ts +5 -0
- package/dist/@types/utils/errors.d.ts.map +1 -0
- package/dist/@types/utils/helpers.d.ts +103 -0
- package/dist/@types/utils/helpers.d.ts.map +1 -0
- package/dist/@types/utils/margins.d.ts +10 -0
- package/dist/@types/utils/margins.d.ts.map +1 -0
- package/dist/@types/utils/svg-check.d.ts +7 -0
- package/dist/@types/utils/svg-check.d.ts.map +1 -0
- package/dist/@types/utils/warnings.d.ts +12 -0
- package/dist/@types/utils/warnings.d.ts.map +1 -0
- package/dist/index.js +1124 -1084
- package/dist/index.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/scss/components/lume-alluvial-group.scss +16 -0
- package/dist/styles/main.css +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { format as
|
|
3
|
-
import { createPopper as
|
|
4
|
-
import { sankeyLinkHorizontal as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as Z, ref as R, openBlock as _, createElementBlock as x, mergeProps as j, createElementVNode as G, toDisplayString as ae, createCommentVNode as z, isRef as Mt, computed as v, watch as Y, toRefs as te, inject as De, reactive as Ge, onMounted as _e, unref as d, Fragment as q, renderList as W, createBlock as K, normalizeClass as oe, normalizeStyle as Bt, onBeforeUnmount as Rt, watchEffect as St, renderSlot as C, createTextVNode as pe, useSlots as ue, withDirectives as rn, withCtx as P, createSlots as ce, vShow as sn, pushScopeId as cn, popScopeId as dn, provide as Fe, createVNode as re, nextTick as gt, toHandlers as le, normalizeProps as fe, guardReactiveProps as he, defineAsyncComponent as ze, resolveDynamicComponent as vn } from "vue";
|
|
2
|
+
import { format as mn, ticks as pn, scaleBand as Ee, scaleLinear as Ne, link as fn, line as hn, area as gn } from "d3";
|
|
3
|
+
import { createPopper as _n } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as yn, sankey as kn, sankeyJustify as bn } from "d3-sankey";
|
|
5
|
+
const An = {
|
|
6
6
|
class: "axis__tick-label lume-typography--axis",
|
|
7
7
|
"pointer-events": "all",
|
|
8
8
|
"data-j-axis__tick-label": ""
|
|
9
|
-
},
|
|
9
|
+
}, Tn = /* @__PURE__ */ Z({
|
|
10
10
|
__name: "lume-tick",
|
|
11
11
|
props: {
|
|
12
12
|
value: {
|
|
@@ -45,7 +45,7 @@ const kn = {
|
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
47
|
const o = t, a = R(null);
|
|
48
|
-
return n({ ref: a }), (
|
|
48
|
+
return n({ ref: a }), (u, l) => (_(), x("g", j(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
@@ -54,27 +54,27 @@ const kn = {
|
|
|
54
54
|
onMouseenter: l[0] || (l[0] = (i) => o("mouseenter", i)),
|
|
55
55
|
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
G("g", An, [
|
|
58
|
+
G("rect", j(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
61
61
|
}), null, 16),
|
|
62
|
-
|
|
62
|
+
G("text", j(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
64
|
ref: a,
|
|
65
65
|
class: "axis__label"
|
|
66
|
-
}),
|
|
66
|
+
}), ae(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (
|
|
68
|
+
e.withGridlines ? (_(), x("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : z("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const
|
|
72
|
+
const ee = (e, n) => {
|
|
73
73
|
const t = e.__vccOpts || e;
|
|
74
74
|
for (const [o, a] of n)
|
|
75
75
|
t[o] = a;
|
|
76
76
|
return t;
|
|
77
|
-
},
|
|
77
|
+
}, _t = /* @__PURE__ */ ee(Tn, [["__scopeId", "data-v-59ddc0a6"]]), Ln = [
|
|
78
78
|
"controls",
|
|
79
79
|
"legend",
|
|
80
80
|
"axes",
|
|
@@ -82,10 +82,10 @@ const q = (e, n) => {
|
|
|
82
82
|
"tooltip",
|
|
83
83
|
"tooltip-content"
|
|
84
84
|
];
|
|
85
|
-
function
|
|
85
|
+
function Ct() {
|
|
86
86
|
return process.env.NODE_ENV === "production";
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Gt(e) {
|
|
89
89
|
return (e == null ? void 0 : e.map(
|
|
90
90
|
(n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
|
|
91
91
|
).flat()) || [];
|
|
@@ -93,50 +93,49 @@ function Rt(e) {
|
|
|
93
93
|
function nt(e) {
|
|
94
94
|
return e.length === 1;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function On(e) {
|
|
97
97
|
return !!e && e.every(
|
|
98
98
|
(n) => "color" in n
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Ze(e) {
|
|
102
102
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function jt(e, n) {
|
|
105
105
|
const t = { ...e };
|
|
106
106
|
return Object.entries(n).forEach(([o, a]) => {
|
|
107
|
-
t[o] =
|
|
107
|
+
t[o] = Ze(e[o]) && Ze(a) ? jt(e[o], a) : a;
|
|
108
108
|
}), t;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return e != null &&
|
|
110
|
+
function xn(e) {
|
|
111
|
+
return e != null && Ze(e) && "value" in e;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function de(e) {
|
|
114
114
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
116
|
+
function $n(e) {
|
|
117
|
+
return de(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const In = (e, n) => {
|
|
120
120
|
if (!e)
|
|
121
121
|
throw new Error("Data is not a valid array");
|
|
122
122
|
if (e.length === 0)
|
|
123
123
|
throw new Error("Cannot get highest value from empty array");
|
|
124
|
-
|
|
124
|
+
e.some(
|
|
125
125
|
({ values: o }) => o.length - 1 >= n
|
|
126
|
-
))
|
|
127
|
-
throw new Error("Index exceeds length of all of the datasets");
|
|
126
|
+
) || ge(ve.IndexExceedsLengthOfDataSets);
|
|
128
127
|
};
|
|
129
|
-
function
|
|
128
|
+
function wn(e, n) {
|
|
130
129
|
var t;
|
|
131
|
-
return
|
|
130
|
+
return In(e, n), ((t = e.reduce(
|
|
132
131
|
(o, a) => {
|
|
133
|
-
var
|
|
134
|
-
return (((
|
|
132
|
+
var u, l;
|
|
133
|
+
return (((u = o.values[n]) == null ? void 0 : u.value) ?? 0) > (((l = a.values[n]) == null ? void 0 : l.value) ?? 0) ? o : a;
|
|
135
134
|
}
|
|
136
135
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
137
136
|
}
|
|
138
137
|
function Ue(e) {
|
|
139
|
-
const n =
|
|
138
|
+
const n = Mt(e) ? e.value : e;
|
|
140
139
|
if (!n)
|
|
141
140
|
throw new Error("No empty array can be created from specified data value");
|
|
142
141
|
const t = Math.max(
|
|
@@ -145,17 +144,17 @@ function Ue(e) {
|
|
|
145
144
|
);
|
|
146
145
|
return Array(t).fill(null);
|
|
147
146
|
}
|
|
148
|
-
function
|
|
149
|
-
return
|
|
147
|
+
function En(e) {
|
|
148
|
+
return de(e) ? e.domain().length : Math.max(...e.domain());
|
|
150
149
|
}
|
|
151
|
-
function
|
|
150
|
+
function Nn(e, n) {
|
|
152
151
|
return (t) => Math.round(e * (1 - t) + n * t);
|
|
153
152
|
}
|
|
154
|
-
function
|
|
153
|
+
function Dn(e, n, t) {
|
|
155
154
|
const o = t ? e.length - n : n, a = e.slice(0, o);
|
|
156
155
|
return e.slice(o).concat(a);
|
|
157
156
|
}
|
|
158
|
-
function
|
|
157
|
+
function Le(e) {
|
|
159
158
|
if (e.groups) {
|
|
160
159
|
const n = Object.keys(e);
|
|
161
160
|
return Object.assign(
|
|
@@ -165,32 +164,32 @@ function Ae(e) {
|
|
|
165
164
|
}
|
|
166
165
|
return e;
|
|
167
166
|
}
|
|
168
|
-
function
|
|
167
|
+
function Hn(e) {
|
|
169
168
|
return Object.assign(
|
|
170
169
|
{},
|
|
171
170
|
...Object.keys(e).map(
|
|
172
|
-
(n) =>
|
|
171
|
+
(n) => Ln.includes(n) ? {} : { [n]: e[n] }
|
|
173
172
|
)
|
|
174
173
|
);
|
|
175
174
|
}
|
|
176
|
-
const
|
|
175
|
+
const Mn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
|
|
177
176
|
(n, t) => n += (t &= 63) < 36 ? t.toString(36) : t < 62 ? (t - 26).toString(36).toUpperCase() : t > 62 ? "-" : "_",
|
|
178
177
|
""
|
|
179
178
|
);
|
|
180
|
-
var
|
|
181
|
-
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e))(
|
|
182
|
-
const
|
|
183
|
-
function
|
|
184
|
-
n &&
|
|
179
|
+
var ve = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
180
|
+
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(ve || {});
|
|
181
|
+
const Bn = "[lume] ";
|
|
182
|
+
function ge(e, n = !0) {
|
|
183
|
+
n && Ct() || console.warn(Bn + "Warning: " + e);
|
|
185
184
|
}
|
|
186
|
-
const
|
|
185
|
+
const Ce = (e) => {
|
|
187
186
|
let n = null;
|
|
188
187
|
switch (typeof e) {
|
|
189
188
|
case "string":
|
|
190
189
|
try {
|
|
191
|
-
n =
|
|
190
|
+
n = mn(e);
|
|
192
191
|
} catch {
|
|
193
|
-
|
|
192
|
+
ge(ve.InvalidFormat), n = null;
|
|
194
193
|
}
|
|
195
194
|
break;
|
|
196
195
|
case "function":
|
|
@@ -203,29 +202,29 @@ const Se = (e) => {
|
|
|
203
202
|
return n ? n(...o) : o[0];
|
|
204
203
|
}
|
|
205
204
|
return t;
|
|
206
|
-
},
|
|
205
|
+
}, He = () => ({
|
|
207
206
|
options: {
|
|
208
207
|
type: Object,
|
|
209
208
|
default: () => ({})
|
|
210
209
|
}
|
|
211
210
|
});
|
|
212
|
-
function
|
|
211
|
+
function me(e, n) {
|
|
213
212
|
return { allOptions: v(() => {
|
|
214
|
-
const o =
|
|
215
|
-
return o ?
|
|
213
|
+
const o = Mt(n) ? n == null ? void 0 : n.value : n;
|
|
214
|
+
return o ? jt(o, e.value) : e.value;
|
|
216
215
|
}) };
|
|
217
216
|
}
|
|
218
|
-
const
|
|
219
|
-
function
|
|
220
|
-
const o = R(), a = v(() => Math.max(...e.value.range())),
|
|
217
|
+
const Rn = 0.2;
|
|
218
|
+
function Sn(e, n, t) {
|
|
219
|
+
const o = R(), a = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
|
|
221
220
|
function l() {
|
|
222
221
|
if (!n.value)
|
|
223
222
|
return;
|
|
224
223
|
const s = n.value.reduce(
|
|
225
|
-
(p,
|
|
224
|
+
(p, r) => p + r.ref.getBoundingClientRect().width,
|
|
226
225
|
0
|
|
227
|
-
), c = Math.ceil(s /
|
|
228
|
-
o.value = c + c *
|
|
226
|
+
), c = Math.ceil(s / u.value);
|
|
227
|
+
o.value = c + c * Rn;
|
|
229
228
|
}
|
|
230
229
|
function i(s) {
|
|
231
230
|
if (!n.value)
|
|
@@ -233,20 +232,20 @@ function Mn(e, n, t) {
|
|
|
233
232
|
const c = n.value.length;
|
|
234
233
|
if (s === 0)
|
|
235
234
|
return !0;
|
|
236
|
-
const p = a.value / c,
|
|
237
|
-
return s %
|
|
235
|
+
const p = a.value / c, r = typeof t == "number" && t > 0 && t + 1 || Math.ceil(o.value / p);
|
|
236
|
+
return s % r === 0;
|
|
238
237
|
}
|
|
239
|
-
return
|
|
238
|
+
return Y(n, l), { showTick: i };
|
|
240
239
|
}
|
|
241
|
-
var
|
|
242
|
-
const
|
|
240
|
+
var ie = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ie || {}), Vt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(Vt || {}), ot = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(ot || {}), at = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(at || {}), lt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(lt || {});
|
|
241
|
+
const H = {
|
|
243
242
|
HORIZONTAL: "horizontal",
|
|
244
243
|
VERTICAL: "vertical"
|
|
245
|
-
},
|
|
244
|
+
}, Cn = {
|
|
246
245
|
SINGLE: "single",
|
|
247
246
|
GROUPED: "grouped",
|
|
248
247
|
STACKED: "stacked"
|
|
249
|
-
},
|
|
248
|
+
}, Pt = "No data", yt = 20, Ft = 0.33, zt = 0.5, Wt = 12, Me = 8, Gn = 1, jn = [
|
|
250
249
|
"auto",
|
|
251
250
|
"auto-start",
|
|
252
251
|
"auto-end",
|
|
@@ -263,10 +262,10 @@ const B = {
|
|
|
263
262
|
"left-start",
|
|
264
263
|
"left-end"
|
|
265
264
|
];
|
|
266
|
-
function
|
|
267
|
-
e != null && e.closest("svg") ||
|
|
265
|
+
function je(e) {
|
|
266
|
+
e != null && e.closest("svg") || ge(ve.NotContainedInSvg);
|
|
268
267
|
}
|
|
269
|
-
const
|
|
268
|
+
const Zt = {
|
|
270
269
|
/** Displays a line for each tick. */
|
|
271
270
|
gridLines: !1,
|
|
272
271
|
/** Displays the axis title. */
|
|
@@ -282,21 +281,21 @@ const Ft = {
|
|
|
282
281
|
tickFormat: null,
|
|
283
282
|
/** Space between the tick label and the axis line. */
|
|
284
283
|
tickPadding: 8
|
|
285
|
-
},
|
|
286
|
-
...
|
|
284
|
+
}, Vn = {
|
|
285
|
+
...Zt,
|
|
287
286
|
withTitle: !1,
|
|
288
287
|
skip: !0
|
|
289
|
-
},
|
|
290
|
-
...
|
|
288
|
+
}, Pn = {
|
|
289
|
+
...Zt,
|
|
291
290
|
gridLines: !0
|
|
292
|
-
},
|
|
291
|
+
}, Fn = function(e, n, t) {
|
|
293
292
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
294
293
|
function a(s, c) {
|
|
295
294
|
return {
|
|
296
295
|
transform: `translate(${(e.value(c) ?? e.value(s)) - o.value}, 0)`
|
|
297
296
|
};
|
|
298
297
|
}
|
|
299
|
-
function
|
|
298
|
+
function u(s) {
|
|
300
299
|
var p;
|
|
301
300
|
const c = Math.max(
|
|
302
301
|
e.value.step(),
|
|
@@ -305,7 +304,7 @@ const Ft = {
|
|
|
305
304
|
return {
|
|
306
305
|
x: -(c - e.value.step()) / 2,
|
|
307
306
|
width: c,
|
|
308
|
-
height: t.value.tickPadding +
|
|
307
|
+
height: t.value.tickPadding + Wt + Me
|
|
309
308
|
};
|
|
310
309
|
}
|
|
311
310
|
function l() {
|
|
@@ -327,20 +326,20 @@ const Ft = {
|
|
|
327
326
|
}
|
|
328
327
|
return {
|
|
329
328
|
getGridLinesAttributes: l,
|
|
330
|
-
getTickGhostAttributes:
|
|
329
|
+
getTickGhostAttributes: u,
|
|
331
330
|
getTickGroupAttributes: a,
|
|
332
331
|
getTickLabelAttributes: i
|
|
333
332
|
};
|
|
334
|
-
},
|
|
333
|
+
}, zn = function(e, n, t) {
|
|
335
334
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
336
335
|
function a(s, c) {
|
|
337
336
|
return {
|
|
338
337
|
transform: `translate(0, ${(e.value(c) ?? e.value(s)) - o.value})`
|
|
339
338
|
};
|
|
340
339
|
}
|
|
341
|
-
function
|
|
340
|
+
function u(s) {
|
|
342
341
|
var p;
|
|
343
|
-
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding +
|
|
342
|
+
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding + Me;
|
|
344
343
|
return {
|
|
345
344
|
x: -c,
|
|
346
345
|
width: c,
|
|
@@ -365,11 +364,11 @@ const Ft = {
|
|
|
365
364
|
}
|
|
366
365
|
return {
|
|
367
366
|
getGridLinesAttributes: l,
|
|
368
|
-
getTickGhostAttributes:
|
|
367
|
+
getTickGhostAttributes: u,
|
|
369
368
|
getTickGroupAttributes: a,
|
|
370
369
|
getTickLabelAttributes: i
|
|
371
370
|
};
|
|
372
|
-
},
|
|
371
|
+
}, Wn = function(e, n, t) {
|
|
373
372
|
const o = v(() => {
|
|
374
373
|
const s = e.value.ticks();
|
|
375
374
|
return s.length > 1 ? e.value(s[1]) - e.value(s[0]) : 0;
|
|
@@ -379,9 +378,9 @@ const Ft = {
|
|
|
379
378
|
transform: `translate(${e.value(s)}, 0)`
|
|
380
379
|
};
|
|
381
380
|
}
|
|
382
|
-
function
|
|
381
|
+
function u() {
|
|
383
382
|
return {
|
|
384
|
-
height: t.value.tickPadding +
|
|
383
|
+
height: t.value.tickPadding + Wt + Me,
|
|
385
384
|
width: o.value,
|
|
386
385
|
x: -(o.value / 2)
|
|
387
386
|
};
|
|
@@ -400,11 +399,11 @@ const Ft = {
|
|
|
400
399
|
}
|
|
401
400
|
return {
|
|
402
401
|
getGridLinesAttributes: l,
|
|
403
|
-
getTickGhostAttributes:
|
|
402
|
+
getTickGhostAttributes: u,
|
|
404
403
|
getTickGroupAttributes: a,
|
|
405
404
|
getTickLabelAttributes: i
|
|
406
405
|
};
|
|
407
|
-
},
|
|
406
|
+
}, Zn = function(e, n, t) {
|
|
408
407
|
const o = v(() => {
|
|
409
408
|
const s = e.value.ticks();
|
|
410
409
|
return s.length > 1 ? e.value(s[1]) - e.value(s[0]) : 0;
|
|
@@ -414,9 +413,9 @@ const Ft = {
|
|
|
414
413
|
transform: `translate(0, ${e.value(s)})`
|
|
415
414
|
};
|
|
416
415
|
}
|
|
417
|
-
function
|
|
416
|
+
function u(s) {
|
|
418
417
|
var p;
|
|
419
|
-
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding +
|
|
418
|
+
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding + Me;
|
|
420
419
|
return {
|
|
421
420
|
width: c,
|
|
422
421
|
height: o.value,
|
|
@@ -438,37 +437,37 @@ const Ft = {
|
|
|
438
437
|
}
|
|
439
438
|
return {
|
|
440
439
|
getGridLinesAttributes: l,
|
|
441
|
-
getTickGhostAttributes:
|
|
440
|
+
getTickGhostAttributes: u,
|
|
442
441
|
getTickGroupAttributes: a,
|
|
443
442
|
getTickLabelAttributes: i
|
|
444
443
|
};
|
|
445
|
-
},
|
|
446
|
-
"x-band-scale-axis":
|
|
447
|
-
"y-band-scale-axis":
|
|
448
|
-
"x-linear-scale-axis":
|
|
449
|
-
"y-linear-scale-axis":
|
|
450
|
-
},
|
|
451
|
-
/* @__PURE__ */
|
|
444
|
+
}, Un = {
|
|
445
|
+
"x-band-scale-axis": Fn,
|
|
446
|
+
"y-band-scale-axis": zn,
|
|
447
|
+
"x-linear-scale-axis": Wn,
|
|
448
|
+
"y-linear-scale-axis": Zn
|
|
449
|
+
}, Xn = ["transform"], Yn = { key: 0 }, Kn = /* @__PURE__ */ G("linearGradient", { id: "lume-tick-gradient" }, [
|
|
450
|
+
/* @__PURE__ */ G("stop", {
|
|
452
451
|
offset: "0%",
|
|
453
452
|
"stop-color": "rgba(255,255,255,0)"
|
|
454
453
|
}),
|
|
455
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ G("stop", {
|
|
456
455
|
offset: "10%",
|
|
457
456
|
"stop-color": "var(--lume-chart-background-color)"
|
|
458
457
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ G("stop", {
|
|
460
459
|
offset: "90%",
|
|
461
460
|
"stop-color": "var(--lume-chart-background-color)"
|
|
462
461
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ G("stop", {
|
|
464
463
|
offset: "100%",
|
|
465
464
|
"stop-color": "rgba(255,255,255,0)"
|
|
466
465
|
})
|
|
467
|
-
], -1),
|
|
468
|
-
|
|
466
|
+
], -1), Jn = [
|
|
467
|
+
Kn
|
|
469
468
|
];
|
|
470
|
-
var
|
|
471
|
-
const
|
|
469
|
+
var Ut = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Ut || {}), Xt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Xt || {}), Xe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Xe || {});
|
|
470
|
+
const kt = /* @__PURE__ */ Z({
|
|
472
471
|
__name: "lume-axis",
|
|
473
472
|
props: {
|
|
474
473
|
scale: {
|
|
@@ -483,7 +482,7 @@ const _t = /* @__PURE__ */ W({
|
|
|
483
482
|
position: {
|
|
484
483
|
type: String,
|
|
485
484
|
default: void 0,
|
|
486
|
-
validator: (e) => e in
|
|
485
|
+
validator: (e) => e in Xt
|
|
487
486
|
},
|
|
488
487
|
containerSize: {
|
|
489
488
|
type: Object,
|
|
@@ -495,43 +494,43 @@ const _t = /* @__PURE__ */ W({
|
|
|
495
494
|
},
|
|
496
495
|
orientation: {
|
|
497
496
|
type: String,
|
|
498
|
-
default:
|
|
497
|
+
default: H.VERTICAL
|
|
499
498
|
},
|
|
500
|
-
...
|
|
499
|
+
...He()
|
|
501
500
|
},
|
|
502
501
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
503
502
|
setup(e, { emit: n }) {
|
|
504
|
-
const o = e, a = n, { scale:
|
|
503
|
+
const o = e, a = n, { scale: u, containerSize: l, hoveredIndex: i, options: s, orientation: c } = te(o), p = De("isEmpty", R(!1)), r = Ge({}), f = R(null), g = R(null), m = R(null), T = v(
|
|
505
504
|
() => o.type ? Xe[o.type] : o.position
|
|
506
505
|
), O = v(
|
|
507
506
|
() => o.type || (T.value === "left" ? "y" : "x")
|
|
508
507
|
), b = v(
|
|
509
|
-
() => O.value === "x" && c.value ===
|
|
510
|
-
), { allOptions: h } =
|
|
508
|
+
() => O.value === "x" && c.value === H.VERTICAL || O.value === "y" && c.value === H.HORIZONTAL
|
|
509
|
+
), { allOptions: h } = me(
|
|
511
510
|
s,
|
|
512
|
-
O.value === "x" ?
|
|
513
|
-
), { showTick:
|
|
514
|
-
var M, k,
|
|
515
|
-
return O.value === "y" && p.value ? `translate(0, ${((
|
|
516
|
-
}), D = v(() => {
|
|
517
|
-
if (be(r.value))
|
|
518
|
-
return r.value.labels || r.value.domain();
|
|
519
|
-
const { tickCount: M } = h.value, [k, E] = r.value.domain();
|
|
520
|
-
return vn(k, E, M);
|
|
511
|
+
O.value === "x" ? Vn : Pn
|
|
512
|
+
), { showTick: $ } = Sn(u, f, h.value.skip), w = v(() => {
|
|
513
|
+
var S, M, k, B;
|
|
514
|
+
return O.value === "y" && p.value ? `translate(0, ${((S = l.value) == null ? void 0 : S.height) / 2})` : O.value === "x" && p.value ? `translate(-${((M = l.value) == null ? void 0 : M.width) / 2}, ${(k = l.value) == null ? void 0 : k.height})` : `translate(0, ${O.value === "x" ? (B = l.value) == null ? void 0 : B.height : 0})`;
|
|
521
515
|
}), N = v(() => {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
516
|
+
if (de(u.value))
|
|
517
|
+
return u.value.labels || u.value.domain();
|
|
518
|
+
const { tickCount: S } = h.value, [M, k] = u.value.domain();
|
|
519
|
+
return pn(M, k, S);
|
|
520
|
+
}), E = v(() => {
|
|
521
|
+
const { tickFormat: S } = h.value;
|
|
522
|
+
return Ce(S);
|
|
523
|
+
}), D = v(
|
|
525
524
|
() => h.value.withHover && b.value && i.value > -1
|
|
526
|
-
),
|
|
527
|
-
() => h.value.tickPadding +
|
|
525
|
+
), V = v(
|
|
526
|
+
() => h.value.tickPadding + Me || 16
|
|
528
527
|
), U = v(() => O.value === "x" ? (
|
|
529
528
|
// If x axis, get the tick height
|
|
530
529
|
Math.max(
|
|
531
530
|
...(f.value || []).map(
|
|
532
|
-
(
|
|
533
|
-
var
|
|
534
|
-
return ((
|
|
531
|
+
(S) => {
|
|
532
|
+
var M, k;
|
|
533
|
+
return ((k = (M = S.ref).getBBox) == null ? void 0 : k.call(M).height) + V.value;
|
|
535
534
|
}
|
|
536
535
|
)
|
|
537
536
|
)
|
|
@@ -539,99 +538,99 @@ const _t = /* @__PURE__ */ W({
|
|
|
539
538
|
// If y axis, get the tick width
|
|
540
539
|
Math.max(
|
|
541
540
|
...(f.value || []).map(
|
|
542
|
-
(
|
|
543
|
-
var
|
|
544
|
-
return ((
|
|
541
|
+
(S) => {
|
|
542
|
+
var M, k;
|
|
543
|
+
return ((k = (M = S.ref).getBBox) == null ? void 0 : k.call(M).width) + V.value;
|
|
545
544
|
}
|
|
546
545
|
)
|
|
547
546
|
)
|
|
548
547
|
));
|
|
549
|
-
function
|
|
550
|
-
const { showTicks:
|
|
551
|
-
return
|
|
548
|
+
function ne(S) {
|
|
549
|
+
const { showTicks: M } = h.value;
|
|
550
|
+
return M === !1 ? "" : E.value(S);
|
|
552
551
|
}
|
|
553
|
-
function F(M, k
|
|
554
|
-
a("mouseenter", { index: b.value ?
|
|
552
|
+
function F(S, M, k) {
|
|
553
|
+
a("mouseenter", { index: b.value ? S : null, value: M, event: k });
|
|
555
554
|
}
|
|
556
|
-
function
|
|
557
|
-
a("click", { index:
|
|
555
|
+
function Q(S, M, k) {
|
|
556
|
+
a("click", { index: S, value: M, event: k });
|
|
558
557
|
}
|
|
559
|
-
function
|
|
560
|
-
var
|
|
558
|
+
function Oe(S) {
|
|
559
|
+
var M;
|
|
561
560
|
if (!(!f.value || !f.value.length))
|
|
562
|
-
return (
|
|
561
|
+
return (M = f.value[S]) == null ? void 0 : M.ref;
|
|
563
562
|
}
|
|
564
|
-
function
|
|
565
|
-
m.value =
|
|
566
|
-
(
|
|
567
|
-
value:
|
|
568
|
-
group:
|
|
569
|
-
ghost:
|
|
570
|
-
label:
|
|
571
|
-
gridline:
|
|
563
|
+
function xe() {
|
|
564
|
+
m.value = N.value.map(
|
|
565
|
+
(S, M) => ({
|
|
566
|
+
value: ne(S),
|
|
567
|
+
group: r.getTickGroupAttributes(S, M),
|
|
568
|
+
ghost: r.getTickGhostAttributes(Oe(M)),
|
|
569
|
+
label: r.getTickLabelAttributes(),
|
|
570
|
+
gridline: r.getGridLinesAttributes()
|
|
572
571
|
})
|
|
573
572
|
);
|
|
574
573
|
}
|
|
575
|
-
function
|
|
576
|
-
const
|
|
577
|
-
Object.entries(
|
|
578
|
-
([
|
|
579
|
-
|
|
574
|
+
function ke() {
|
|
575
|
+
const S = u.value.step ? "bandScale" : "linearScale", M = Un[`${O.value}-${Ut[S]}`];
|
|
576
|
+
Object.entries(M(u, l, h) || []).forEach(
|
|
577
|
+
([k, B]) => {
|
|
578
|
+
r[k] = B;
|
|
580
579
|
}
|
|
581
580
|
);
|
|
582
581
|
}
|
|
583
|
-
return
|
|
582
|
+
return Y(u, ke, { flush: "sync", immediate: !0 }), Y(u, xe, { immediate: !0 }), Y(f, xe), Y(U, (S) => a("lume__internal--axis-size", S)), _e(() => je(g.value)), (S, M) => d(u) ? (_(), x("g", {
|
|
584
583
|
key: 0,
|
|
585
584
|
ref_key: "root",
|
|
586
585
|
ref: g,
|
|
587
586
|
class: "axis",
|
|
588
587
|
transform: w.value,
|
|
589
588
|
"data-j-axis": "",
|
|
590
|
-
onMouseleave:
|
|
589
|
+
onMouseleave: M[1] || (M[1] = (k) => a("mouseleave", k))
|
|
591
590
|
}, [
|
|
592
|
-
O.value === "x" ? (
|
|
593
|
-
(
|
|
594
|
-
key: `${
|
|
591
|
+
O.value === "x" ? (_(), x("defs", Yn, Jn)) : z("", !0),
|
|
592
|
+
(_(!0), x(q, null, W(m.value, (k, B) => (_(), K(d(_t), j({
|
|
593
|
+
key: `${k.value}_${B}`,
|
|
595
594
|
ref_for: !0,
|
|
596
595
|
ref_key: "tickRefs",
|
|
597
596
|
ref: f
|
|
598
|
-
},
|
|
599
|
-
"is-hidden": d(h).skip && !d(
|
|
597
|
+
}, k, {
|
|
598
|
+
"is-hidden": d(h).skip && !d($)(B),
|
|
600
599
|
"with-gridlines": d(h).gridLines,
|
|
601
|
-
onMouseenter: (
|
|
602
|
-
onClick: (
|
|
600
|
+
onMouseenter: (y) => F(B, k.value, y),
|
|
601
|
+
onClick: (y) => Q(B, k.value, y)
|
|
603
602
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
604
|
-
|
|
603
|
+
D.value ? (_(), K(d(_t), j({ key: 1 }, m.value[d(i)], {
|
|
605
604
|
"with-gridlines": !1,
|
|
606
605
|
"is-hovered": "",
|
|
607
|
-
onClick:
|
|
606
|
+
onClick: M[0] || (M[0] = (k) => Q(
|
|
608
607
|
d(i),
|
|
609
608
|
m.value[d(i)].value,
|
|
610
|
-
|
|
609
|
+
k
|
|
611
610
|
))
|
|
612
611
|
}), null, 16)) : z("", !0)
|
|
613
|
-
], 40,
|
|
612
|
+
], 40, Xn)) : z("", !0);
|
|
614
613
|
}
|
|
615
614
|
});
|
|
616
|
-
function
|
|
617
|
-
const a = v(() => t.value > 0 && t.value < 1),
|
|
615
|
+
function Qn(e, n, t, o) {
|
|
616
|
+
const a = v(() => t.value > 0 && t.value < 1), u = v(
|
|
618
617
|
() => o.value > 0 && o.value < 1
|
|
619
618
|
), l = v(
|
|
620
619
|
() => a.value ? e.value - 0.5 : e.value
|
|
621
620
|
// draws the 1px bar closer to the axis
|
|
622
621
|
), i = v(
|
|
623
|
-
() =>
|
|
622
|
+
() => u.value ? n.value - 0.5 : n.value
|
|
624
623
|
// draws the 1px bar closer to the axis
|
|
625
624
|
);
|
|
626
|
-
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight:
|
|
625
|
+
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: u };
|
|
627
626
|
}
|
|
628
|
-
function
|
|
629
|
-
const a = R(0),
|
|
630
|
-
return
|
|
631
|
-
a.value = t.value,
|
|
632
|
-
}),
|
|
627
|
+
function qn(e, n, t, o) {
|
|
628
|
+
const a = R(0), u = R(0), l = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
629
|
+
return _e(() => {
|
|
630
|
+
a.value = t.value, u.value = o.value;
|
|
631
|
+
}), Y(t, (i) => a.value = i), Y(o, (i) => u.value = i), { computedWidth: a, computedHeight: u, transformOrigin: l };
|
|
633
632
|
}
|
|
634
|
-
const
|
|
633
|
+
const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
635
634
|
__name: "lume-bar",
|
|
636
635
|
props: {
|
|
637
636
|
x: {
|
|
@@ -669,49 +668,49 @@ const Qn = ["x", "y", "width", "height"], qn = /* @__PURE__ */ W({
|
|
|
669
668
|
},
|
|
670
669
|
emits: ["click", "mouseover", "mouseleave"],
|
|
671
670
|
setup(e, { emit: n }) {
|
|
672
|
-
const t = e, o = n, { x: a, y:
|
|
671
|
+
const t = e, o = n, { x: a, y: u, width: l, height: i, transition: s, classList: c } = te(t), p = R(null), r = v(
|
|
673
672
|
() => typeof c.value == "string" ? [c.value] : c.value
|
|
674
|
-
), f = v(() => s.value === "width"), g = v(() => s.value === "height"), m =
|
|
675
|
-
return
|
|
673
|
+
), f = v(() => s.value === "width"), g = v(() => s.value === "height"), m = qn(a, u, l, i), { computedX: T, computedY: O, shouldHaveMinWidth: b, shouldHaveMinHeight: h } = Qn(a, u, l, i), $ = v(() => b.value ? 1 : (f.value ? m.computedWidth : l).value), w = v(() => h.value ? 1 : (g.value ? m.computedHeight : i).value), N = f.value || g.value ? m.transformOrigin : null;
|
|
674
|
+
return _e(() => je(p.value)), (E, D) => (_(), x("rect", {
|
|
676
675
|
ref_key: "root",
|
|
677
676
|
ref: p,
|
|
678
|
-
class:
|
|
677
|
+
class: oe(["lume-bar", [
|
|
679
678
|
{
|
|
680
679
|
"lume-fill--faded": e.isFaded,
|
|
681
680
|
"lume-bar--negative": e.isNegative,
|
|
682
681
|
"lume-bar--transition-width": f.value,
|
|
683
682
|
"lume-bar--transition-height": g.value
|
|
684
683
|
},
|
|
685
|
-
...
|
|
684
|
+
...r.value
|
|
686
685
|
]]),
|
|
687
|
-
style:
|
|
686
|
+
style: Bt({ transformOrigin: d(N) }),
|
|
688
687
|
x: d(T),
|
|
689
688
|
y: d(O),
|
|
690
|
-
width:
|
|
689
|
+
width: $.value,
|
|
691
690
|
height: w.value,
|
|
692
691
|
"data-j-bar": "",
|
|
693
|
-
onClick:
|
|
694
|
-
onMouseover:
|
|
695
|
-
onMouseleave:
|
|
696
|
-
}, null, 46,
|
|
692
|
+
onClick: D[0] || (D[0] = (V) => o("click", V)),
|
|
693
|
+
onMouseover: D[1] || (D[1] = (V) => o("mouseover", V)),
|
|
694
|
+
onMouseleave: D[2] || (D[2] = (V) => o("mouseleave", V))
|
|
695
|
+
}, null, 46, eo));
|
|
697
696
|
}
|
|
698
697
|
});
|
|
699
|
-
const
|
|
700
|
-
function
|
|
701
|
-
const e = R(), n =
|
|
698
|
+
const ut = /* @__PURE__ */ ee(to, [["__scopeId", "data-v-8e8f732a"]]);
|
|
699
|
+
function no() {
|
|
700
|
+
const e = R(), n = Ge({
|
|
702
701
|
dimensions: {}
|
|
703
702
|
}), t = new ResizeObserver((o) => {
|
|
704
703
|
o.forEach((a) => {
|
|
705
704
|
n.dimensions = a.contentRect;
|
|
706
705
|
});
|
|
707
706
|
});
|
|
708
|
-
return
|
|
707
|
+
return _e(() => {
|
|
709
708
|
t.observe(e.value);
|
|
710
|
-
}),
|
|
709
|
+
}), Rt(() => {
|
|
711
710
|
t.unobserve(e.value);
|
|
712
711
|
}), { resizeState: n, resizeRef: e };
|
|
713
712
|
}
|
|
714
|
-
const
|
|
713
|
+
const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
715
714
|
__name: "lume-chart-container",
|
|
716
715
|
props: {
|
|
717
716
|
margins: {
|
|
@@ -733,75 +732,75 @@ const to = ["height"], no = ["transform"], oo = /* @__PURE__ */ W({
|
|
|
733
732
|
},
|
|
734
733
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
735
734
|
setup(e, { emit: n }) {
|
|
736
|
-
const t = e, o = n, { margins: a, containerSize:
|
|
737
|
-
() =>
|
|
735
|
+
const t = e, o = n, { margins: a, containerSize: u } = te(t), l = R(null), { resizeRef: i, resizeState: s } = no(), c = v(
|
|
736
|
+
() => u.value.height + a.value.top + a.value.bottom
|
|
738
737
|
);
|
|
739
|
-
return
|
|
738
|
+
return St(() => {
|
|
740
739
|
if (!l.value)
|
|
741
740
|
return;
|
|
742
|
-
const { width: p } = s.dimensions, { height:
|
|
743
|
-
if (!p || !
|
|
741
|
+
const { width: p } = s.dimensions, { height: r } = l.value.getBoundingClientRect();
|
|
742
|
+
if (!p || !r)
|
|
744
743
|
return;
|
|
745
|
-
const f = p - a.value.left - a.value.right, g =
|
|
744
|
+
const f = p - a.value.left - a.value.right, g = r - a.value.top - a.value.bottom, m = {
|
|
746
745
|
width: f > 0 ? f : 0,
|
|
747
746
|
height: g > 0 ? g : 0,
|
|
748
747
|
outerWidth: p,
|
|
749
|
-
outerHeight:
|
|
748
|
+
outerHeight: r
|
|
750
749
|
};
|
|
751
750
|
o("resize", m);
|
|
752
|
-
}), (p,
|
|
751
|
+
}), (p, r) => (_(), x("div", {
|
|
753
752
|
ref_key: "resizeRef",
|
|
754
753
|
ref: i,
|
|
755
|
-
class:
|
|
754
|
+
class: oe(["lume-chart-container", {
|
|
756
755
|
"lume-chart-container--minimum": !e.noMinSize
|
|
757
756
|
}]),
|
|
758
757
|
"data-j-chart-container": ""
|
|
759
758
|
}, [
|
|
760
|
-
|
|
761
|
-
(
|
|
759
|
+
C(p.$slots, "header", {}, void 0, !0),
|
|
760
|
+
(_(), x("svg", {
|
|
762
761
|
ref_key: "root",
|
|
763
762
|
ref: l,
|
|
764
|
-
class:
|
|
763
|
+
class: oe(["lume-chart-container__svg", {
|
|
765
764
|
"lume-chart-container__svg--transparent": e.transparentBackground
|
|
766
765
|
}]),
|
|
767
766
|
height: c.value,
|
|
768
767
|
"data-j-chart-container__root": "",
|
|
769
|
-
onClick:
|
|
770
|
-
onMouseenter:
|
|
771
|
-
onMouseleave:
|
|
768
|
+
onClick: r[0] || (r[0] = (f) => o("click", f)),
|
|
769
|
+
onMouseenter: r[1] || (r[1] = (f) => o("mouseenter", f)),
|
|
770
|
+
onMouseleave: r[2] || (r[2] = (f) => o("mouseleave", f))
|
|
772
771
|
}, [
|
|
773
|
-
|
|
772
|
+
G("g", {
|
|
774
773
|
transform: `translate(${d(a).left}, ${d(a).top})`,
|
|
775
774
|
class: "lume-chart-container__group",
|
|
776
775
|
"data-j-chart-container__group": ""
|
|
777
776
|
}, [
|
|
778
|
-
|
|
779
|
-
], 8,
|
|
780
|
-
], 42,
|
|
781
|
-
|
|
782
|
-
|
|
777
|
+
C(p.$slots, "default", {}, void 0, !0)
|
|
778
|
+
], 8, ao)
|
|
779
|
+
], 42, oo)),
|
|
780
|
+
C(p.$slots, "footer", {}, void 0, !0),
|
|
781
|
+
C(p.$slots, "extra", {}, void 0, !0)
|
|
783
782
|
], 2));
|
|
784
783
|
}
|
|
785
784
|
});
|
|
786
|
-
const
|
|
785
|
+
const uo = /* @__PURE__ */ ee(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["onClick", "onMouseenter"], io = /* @__PURE__ */ Z({
|
|
787
786
|
__name: "lume-chart-legend",
|
|
788
787
|
props: {
|
|
789
788
|
data: {
|
|
790
789
|
type: Array,
|
|
791
|
-
validator:
|
|
790
|
+
validator: On,
|
|
792
791
|
required: !0
|
|
793
792
|
}
|
|
794
793
|
},
|
|
795
794
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
796
795
|
setup(e, { emit: n }) {
|
|
797
|
-
const t = n, o =
|
|
798
|
-
return (a,
|
|
796
|
+
const t = n, o = De("isEmpty");
|
|
797
|
+
return (a, u) => d(o) ? z("", !0) : (_(), x("div", {
|
|
799
798
|
key: 0,
|
|
800
799
|
class: "lume-chart-legend",
|
|
801
800
|
"data-j-chart-legend": "",
|
|
802
|
-
onMouseleave:
|
|
801
|
+
onMouseleave: u[0] || (u[0] = (l) => t("mouseleave"))
|
|
803
802
|
}, [
|
|
804
|
-
(
|
|
803
|
+
(_(!0), x(q, null, W(e.data, (l, i) => (_(), x("div", {
|
|
805
804
|
key: `legend-item-${i}`,
|
|
806
805
|
class: "lume-chart-legend__item lume-typography--body",
|
|
807
806
|
tabindex: "0",
|
|
@@ -809,47 +808,47 @@ const ao = /* @__PURE__ */ q(oo, [["__scopeId", "data-v-36870bc4"]]), lo = ["onC
|
|
|
809
808
|
onClick: (s) => t("click", { index: i, dataset: l, event: s }),
|
|
810
809
|
onMouseenter: (s) => t("mouseenter", { index: i, dataset: l, event: s })
|
|
811
810
|
}, [
|
|
812
|
-
|
|
813
|
-
class:
|
|
811
|
+
G("span", {
|
|
812
|
+
class: oe(["lume-chart-legend__symbol", `lume-background-color--${l.color}`]),
|
|
814
813
|
"data-j-chart-legend__symbol": ""
|
|
815
814
|
}, null, 2),
|
|
816
|
-
|
|
817
|
-
], 40,
|
|
815
|
+
pe(" " + ae(l.label || i), 1)
|
|
816
|
+
], 40, ro))), 128))
|
|
818
817
|
], 32));
|
|
819
818
|
}
|
|
820
819
|
});
|
|
821
|
-
const
|
|
822
|
-
const
|
|
820
|
+
const bt = /* @__PURE__ */ ee(io, [["__scopeId", "data-v-4710298b"]]);
|
|
821
|
+
const so = {}, co = {
|
|
823
822
|
class: "lume-tooltip__title",
|
|
824
823
|
"data-j-tooltip__title": ""
|
|
825
824
|
};
|
|
826
|
-
function
|
|
827
|
-
return
|
|
828
|
-
|
|
825
|
+
function vo(e, n) {
|
|
826
|
+
return _(), x("div", co, [
|
|
827
|
+
C(e.$slots, "default", {}, void 0, !0)
|
|
829
828
|
]);
|
|
830
829
|
}
|
|
831
|
-
const
|
|
832
|
-
const
|
|
830
|
+
const mo = /* @__PURE__ */ ee(so, [["render", vo], ["__scopeId", "data-v-8af3fac6"]]);
|
|
831
|
+
const po = {}, fo = {
|
|
833
832
|
class: "lume-tooltip__item",
|
|
834
833
|
"data-j-tooltip__summary-item": ""
|
|
835
|
-
},
|
|
836
|
-
function
|
|
837
|
-
return
|
|
838
|
-
|
|
839
|
-
|
|
834
|
+
}, ho = { class: "lume-tooltip__value" };
|
|
835
|
+
function go(e, n) {
|
|
836
|
+
return _(), x("li", fo, [
|
|
837
|
+
G("span", null, [
|
|
838
|
+
C(e.$slots, "default", {}, void 0, !0)
|
|
840
839
|
]),
|
|
841
|
-
|
|
842
|
-
|
|
840
|
+
G("strong", ho, [
|
|
841
|
+
C(e.$slots, "value", {}, void 0, !0)
|
|
843
842
|
])
|
|
844
843
|
]);
|
|
845
844
|
}
|
|
846
|
-
const
|
|
845
|
+
const _o = /* @__PURE__ */ ee(po, [["render", go], ["__scopeId", "data-v-4ed7ec1b"]]), yo = {
|
|
847
846
|
class: "lume-tooltip__item",
|
|
848
847
|
"data-j-tooltip__item": ""
|
|
849
|
-
},
|
|
848
|
+
}, ko = { "data-j-tooltip__item__label": "" }, bo = {
|
|
850
849
|
class: "lume-tooltip__value",
|
|
851
850
|
"data-j-tooltip__item__value": ""
|
|
852
|
-
},
|
|
851
|
+
}, Ao = /* @__PURE__ */ Z({
|
|
853
852
|
__name: "lume-tooltip-item",
|
|
854
853
|
props: {
|
|
855
854
|
color: {
|
|
@@ -858,27 +857,27 @@ const ho = /* @__PURE__ */ q(vo, [["render", fo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
858
857
|
}
|
|
859
858
|
},
|
|
860
859
|
setup(e) {
|
|
861
|
-
return (n, t) => (
|
|
862
|
-
e.color ? (
|
|
860
|
+
return (n, t) => (_(), x("li", yo, [
|
|
861
|
+
e.color ? (_(), x("span", {
|
|
863
862
|
key: 0,
|
|
864
|
-
class:
|
|
863
|
+
class: oe([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
865
864
|
"data-j-tooltip__item__symbol": ""
|
|
866
865
|
}, null, 2)) : z("", !0),
|
|
867
|
-
|
|
868
|
-
|
|
866
|
+
G("span", ko, [
|
|
867
|
+
C(n.$slots, "label", {}, void 0, !0)
|
|
869
868
|
]),
|
|
870
|
-
|
|
871
|
-
|
|
869
|
+
G("strong", bo, [
|
|
870
|
+
C(n.$slots, "value", {}, void 0, !0)
|
|
872
871
|
])
|
|
873
872
|
]));
|
|
874
873
|
}
|
|
875
874
|
});
|
|
876
|
-
const
|
|
875
|
+
const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e) => (cn("data-v-8ec11304"), e = e(), dn(), e), Oo = { class: "lume-tooltip__items" }, xo = {
|
|
877
876
|
key: 0,
|
|
878
877
|
class: "lume-tooltip__break"
|
|
879
|
-
},
|
|
880
|
-
|
|
881
|
-
],
|
|
878
|
+
}, $o = /* @__PURE__ */ Lo(() => /* @__PURE__ */ G("hr", null, null, -1)), Io = [
|
|
879
|
+
$o
|
|
880
|
+
], wo = /* @__PURE__ */ Z({
|
|
882
881
|
__name: "lume-tooltip",
|
|
883
882
|
props: {
|
|
884
883
|
targetElement: {
|
|
@@ -892,7 +891,7 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
892
891
|
position: {
|
|
893
892
|
type: String,
|
|
894
893
|
default: "auto",
|
|
895
|
-
validator: (e) =>
|
|
894
|
+
validator: (e) => jn.includes(e)
|
|
896
895
|
},
|
|
897
896
|
fixedPositioning: {
|
|
898
897
|
type: Boolean,
|
|
@@ -910,13 +909,13 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
910
909
|
type: String,
|
|
911
910
|
default: null
|
|
912
911
|
},
|
|
913
|
-
...
|
|
912
|
+
...He()
|
|
914
913
|
},
|
|
915
914
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
916
915
|
setup(e, { emit: n }) {
|
|
917
|
-
const t = e, o = n, a = R(null), { items:
|
|
916
|
+
const t = e, o = n, a = R(null), { items: u, options: l } = te(t), i = ue(), s = R(null), { allOptions: c } = me(l), p = v(
|
|
918
917
|
() => c.value.fixedPositioning ?? t.fixedPositioning
|
|
919
|
-
),
|
|
918
|
+
), r = v(
|
|
920
919
|
() => p.value ? "fixed" : "absolute"
|
|
921
920
|
), f = v(() => [
|
|
922
921
|
{
|
|
@@ -933,81 +932,81 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
933
932
|
...t.modifiers || []
|
|
934
933
|
]), g = v(
|
|
935
934
|
() => c.value.showTitle !== !1 && t.title != null
|
|
936
|
-
), m = v(() =>
|
|
935
|
+
), m = v(() => Ce(c.value.valueFormat)), T = v(() => Ce(c.value.titleFormat)), O = v(
|
|
937
936
|
() => {
|
|
938
|
-
var
|
|
939
|
-
return ((
|
|
937
|
+
var N;
|
|
938
|
+
return ((N = u.value) == null ? void 0 : N.find((E) => E.isSummary)) || {
|
|
940
939
|
label: c.value.summary ?? t.summary
|
|
941
940
|
};
|
|
942
941
|
}
|
|
943
942
|
), b = v(() => i.summary || O.value.label);
|
|
944
943
|
function h() {
|
|
945
|
-
t.targetElement && a.value && (s.value =
|
|
944
|
+
t.targetElement && a.value && (s.value = _n(t.targetElement, a.value, {
|
|
946
945
|
placement: t.position,
|
|
947
|
-
strategy:
|
|
946
|
+
strategy: r.value,
|
|
948
947
|
modifiers: f.value
|
|
949
948
|
}), o("opened", t.targetElement));
|
|
950
949
|
}
|
|
951
|
-
function
|
|
950
|
+
function $() {
|
|
952
951
|
s.value && (s.value.destroy(), o("closed"));
|
|
953
952
|
}
|
|
954
953
|
function w() {
|
|
955
954
|
s.value && (c.value.withAnimation !== !1 && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
|
|
956
955
|
s.value.state.elements.reference = t.targetElement, s.value.update(), o("moved", t.targetElement);
|
|
957
|
-
}() :
|
|
956
|
+
}() : $());
|
|
958
957
|
}
|
|
959
|
-
return
|
|
958
|
+
return Y(
|
|
960
959
|
() => t.targetElement,
|
|
961
|
-
(
|
|
962
|
-
!
|
|
960
|
+
(N, E) => {
|
|
961
|
+
!E && N ? h() : w();
|
|
963
962
|
}
|
|
964
|
-
),
|
|
963
|
+
), _e(h), Rt($), (N, E) => rn((_(), x("div", {
|
|
965
964
|
ref_key: "root",
|
|
966
965
|
ref: a,
|
|
967
|
-
class:
|
|
966
|
+
class: oe(["lume-tooltip lume-typography--caption", {
|
|
968
967
|
"lume-tooltip--pointer-events": d(l).withPointerEvents
|
|
969
968
|
}]),
|
|
970
969
|
"data-j-tooltip": "",
|
|
971
|
-
onMouseenter:
|
|
972
|
-
onMouseleave:
|
|
970
|
+
onMouseenter: E[0] || (E[0] = (D) => o("tooltip-mouseenter")),
|
|
971
|
+
onMouseleave: E[1] || (E[1] = (D) => o("tooltip-mouseleave"))
|
|
973
972
|
}, [
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
g.value ? (
|
|
973
|
+
C(N.$slots, "default", {}, () => [
|
|
974
|
+
C(N.$slots, "title", {}, () => [
|
|
975
|
+
g.value ? (_(), K(d(mo), { key: 0 }, {
|
|
977
976
|
default: P(() => [
|
|
978
|
-
|
|
977
|
+
pe(ae(T.value(e.title)), 1)
|
|
979
978
|
]),
|
|
980
979
|
_: 1
|
|
981
980
|
})) : z("", !0)
|
|
982
981
|
], !0),
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
b.value ? (
|
|
982
|
+
G("ul", Oo, [
|
|
983
|
+
C(N.$slots, "summary", {}, () => [
|
|
984
|
+
b.value ? (_(), K(d(_o), { key: 0 }, ce({
|
|
986
985
|
default: P(() => [
|
|
987
|
-
|
|
986
|
+
pe(ae(O.value.label) + " ", 1)
|
|
988
987
|
]),
|
|
989
988
|
_: 2
|
|
990
989
|
}, [
|
|
991
990
|
O.value.value ? {
|
|
992
991
|
name: "value",
|
|
993
992
|
fn: P(() => [
|
|
994
|
-
|
|
993
|
+
pe(ae(m.value(O.value.value)), 1)
|
|
995
994
|
]),
|
|
996
995
|
key: "0"
|
|
997
996
|
} : void 0
|
|
998
997
|
]), 1024)) : z("", !0)
|
|
999
998
|
], !0),
|
|
1000
|
-
b.value ? (
|
|
1001
|
-
|
|
1002
|
-
(
|
|
1003
|
-
key:
|
|
1004
|
-
color:
|
|
999
|
+
b.value ? (_(), x("li", xo, Io)) : z("", !0),
|
|
1000
|
+
C(N.$slots, "items", {}, () => [
|
|
1001
|
+
(_(!0), x(q, null, W(d(u), (D) => (_(), K(d(To), {
|
|
1002
|
+
key: D.label,
|
|
1003
|
+
color: D.color
|
|
1005
1004
|
}, {
|
|
1006
1005
|
label: P(() => [
|
|
1007
|
-
|
|
1006
|
+
pe(ae(D.label), 1)
|
|
1008
1007
|
]),
|
|
1009
1008
|
value: P(() => [
|
|
1010
|
-
|
|
1009
|
+
pe(ae(m.value(D.value)), 1)
|
|
1011
1010
|
]),
|
|
1012
1011
|
_: 2
|
|
1013
1012
|
}, 1032, ["color"]))), 128))
|
|
@@ -1015,60 +1014,60 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
1015
1014
|
])
|
|
1016
1015
|
], !0)
|
|
1017
1016
|
], 34)), [
|
|
1018
|
-
[
|
|
1017
|
+
[sn, e.targetElement]
|
|
1019
1018
|
]);
|
|
1020
1019
|
}
|
|
1021
1020
|
});
|
|
1022
|
-
const
|
|
1023
|
-
var
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1026
|
-
return e ===
|
|
1021
|
+
const Eo = /* @__PURE__ */ ee(wo, [["__scopeId", "data-v-8ec11304"]]);
|
|
1022
|
+
var Ae = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(Ae || {});
|
|
1023
|
+
const No = Ae.Categorical, Be = ie.Skyblue, Do = ot.SkyTeal;
|
|
1024
|
+
function Ho(e) {
|
|
1025
|
+
return e === Ae.Divergent ? Do : Be;
|
|
1027
1026
|
}
|
|
1028
|
-
function
|
|
1027
|
+
function Mo(e) {
|
|
1029
1028
|
return Object.values(lt).includes(e);
|
|
1030
1029
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return n ===
|
|
1033
|
-
...
|
|
1034
|
-
...
|
|
1030
|
+
function At(e, n) {
|
|
1031
|
+
return n === Ae.Divergent ? Object.values(ot).includes(e) : Object.values({
|
|
1032
|
+
...ie,
|
|
1033
|
+
...Vt,
|
|
1035
1034
|
...at,
|
|
1036
1035
|
...lt
|
|
1037
1036
|
}).includes(e);
|
|
1038
1037
|
}
|
|
1039
|
-
function Ho(e, n) {
|
|
1040
|
-
const t = Object.values(ue).indexOf(e);
|
|
1041
|
-
return En(Object.values(ue), t > -1 ? t : 0)[n];
|
|
1042
|
-
}
|
|
1043
1038
|
function Bo(e, n) {
|
|
1039
|
+
const t = Object.values(ie).indexOf(e);
|
|
1040
|
+
return Dn(Object.values(ie), t > -1 ? t : 0)[n];
|
|
1041
|
+
}
|
|
1042
|
+
function Ro(e, n) {
|
|
1044
1043
|
const t = 50 + n * 10;
|
|
1045
1044
|
return `${e}-${t}`;
|
|
1046
1045
|
}
|
|
1047
|
-
function
|
|
1046
|
+
function So(e, n) {
|
|
1048
1047
|
const t = (n + 1) * 10;
|
|
1049
1048
|
return `${e}-${t}`;
|
|
1050
1049
|
}
|
|
1051
|
-
function
|
|
1050
|
+
function Tt(e, n, t) {
|
|
1052
1051
|
switch (n) {
|
|
1053
1052
|
default:
|
|
1054
|
-
case
|
|
1055
|
-
return
|
|
1056
|
-
case
|
|
1057
|
-
return
|
|
1058
|
-
case
|
|
1059
|
-
return
|
|
1053
|
+
case Ae.Categorical:
|
|
1054
|
+
return Mo(e) ? e : Bo(e, t);
|
|
1055
|
+
case Ae.Sequential:
|
|
1056
|
+
return Ro(e, t);
|
|
1057
|
+
case Ae.Divergent:
|
|
1058
|
+
return So(e, t);
|
|
1060
1059
|
}
|
|
1061
1060
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1061
|
+
function Co(e, n, t = No, o) {
|
|
1062
|
+
return At(e, t) ? e : (o > 4 && (ge(ve.ColorLoop), o = o % 5), At(n, t) ? Tt(n, t, o) : Tt(Ho(t), t, o));
|
|
1064
1063
|
}
|
|
1065
|
-
function
|
|
1066
|
-
return e.map((n) =>
|
|
1064
|
+
function Go(e) {
|
|
1065
|
+
return e.map((n) => xn(n) ? n : { value: n });
|
|
1067
1066
|
}
|
|
1068
|
-
function
|
|
1067
|
+
function jo(e) {
|
|
1069
1068
|
return e.__internal === !0;
|
|
1070
1069
|
}
|
|
1071
|
-
const
|
|
1070
|
+
const rt = (e = null) => ({
|
|
1072
1071
|
data: {
|
|
1073
1072
|
type: Array,
|
|
1074
1073
|
required: !0,
|
|
@@ -1080,7 +1079,7 @@ const ut = (e = null) => ({
|
|
|
1080
1079
|
},
|
|
1081
1080
|
color: {
|
|
1082
1081
|
type: String,
|
|
1083
|
-
default:
|
|
1082
|
+
default: ie.Skyblue
|
|
1084
1083
|
},
|
|
1085
1084
|
title: {
|
|
1086
1085
|
type: String,
|
|
@@ -1088,43 +1087,43 @@ const ut = (e = null) => ({
|
|
|
1088
1087
|
}
|
|
1089
1088
|
});
|
|
1090
1089
|
function it(e, n, t, o, a) {
|
|
1091
|
-
const
|
|
1090
|
+
const u = Ge({
|
|
1092
1091
|
width: 0,
|
|
1093
1092
|
height: 0
|
|
1094
|
-
}), l =
|
|
1093
|
+
}), l = Mn(12), i = v(() => {
|
|
1095
1094
|
var p;
|
|
1096
|
-
return e.value.length > 5 &&
|
|
1097
|
-
(
|
|
1098
|
-
if (
|
|
1099
|
-
return
|
|
1100
|
-
const g =
|
|
1101
|
-
|
|
1095
|
+
return e.value.length > 5 && ge(ve.DatasetLength), (p = e.value) == null ? void 0 : p.map(
|
|
1096
|
+
(r, f) => {
|
|
1097
|
+
if (jo(r))
|
|
1098
|
+
return r;
|
|
1099
|
+
const g = Go(r.values), m = Co(
|
|
1100
|
+
r.color,
|
|
1102
1101
|
t == null ? void 0 : t.value,
|
|
1103
1102
|
o == null ? void 0 : o.value.colorPalette,
|
|
1104
1103
|
f
|
|
1105
1104
|
);
|
|
1106
1105
|
return {
|
|
1107
|
-
...
|
|
1106
|
+
...r,
|
|
1108
1107
|
values: g,
|
|
1109
1108
|
color: m,
|
|
1110
1109
|
__internal: !0
|
|
1111
1110
|
};
|
|
1112
1111
|
}
|
|
1113
1112
|
);
|
|
1114
|
-
}), s = v(() => Array.isArray(n.value) ? n.value : Ue(e.value).map((p,
|
|
1113
|
+
}), s = v(() => Array.isArray(n.value) ? n.value : Ue(e.value).map((p, r) => r));
|
|
1115
1114
|
function c(p) {
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1115
|
+
const r = (a == null ? void 0 : a.value) === H.HORIZONTAL && Ue(e).length * (((o == null ? void 0 : o.value.barHeight) || yt) * 2) + ((o == null ? void 0 : o.value.barHeight) || yt) || p.height;
|
|
1116
|
+
u.width = p.width, u.height = r;
|
|
1118
1117
|
}
|
|
1119
1118
|
return {
|
|
1120
1119
|
chartID: l,
|
|
1121
1120
|
computedLabels: s,
|
|
1122
|
-
containerSize:
|
|
1121
|
+
containerSize: u,
|
|
1123
1122
|
internalData: i,
|
|
1124
1123
|
updateSize: c
|
|
1125
1124
|
};
|
|
1126
1125
|
}
|
|
1127
|
-
const
|
|
1126
|
+
const Vo = () => ({
|
|
1128
1127
|
xScale: {
|
|
1129
1128
|
type: Function,
|
|
1130
1129
|
default: null
|
|
@@ -1134,69 +1133,69 @@ const Go = () => ({
|
|
|
1134
1133
|
default: null
|
|
1135
1134
|
}
|
|
1136
1135
|
});
|
|
1137
|
-
function
|
|
1138
|
-
const
|
|
1136
|
+
function Po(e, n, t, o, a) {
|
|
1137
|
+
const u = R(null), l = R(null);
|
|
1139
1138
|
function i() {
|
|
1140
1139
|
const { width: s, height: c } = t;
|
|
1141
|
-
!s && !c || !n.value || !e.value || (o.value ===
|
|
1140
|
+
!s && !c || !n.value || !e.value || (o.value === H.HORIZONTAL ? (u.value = Ot(
|
|
1142
1141
|
e.value,
|
|
1143
1142
|
s,
|
|
1144
1143
|
o.value,
|
|
1145
1144
|
a.value.startOnZero
|
|
1146
|
-
), l.value =
|
|
1145
|
+
), l.value = Lt(
|
|
1147
1146
|
n.value,
|
|
1148
1147
|
c,
|
|
1149
1148
|
o.value,
|
|
1150
1149
|
a.value
|
|
1151
|
-
)) : (
|
|
1150
|
+
)) : (u.value = Lt(
|
|
1152
1151
|
n.value,
|
|
1153
1152
|
s,
|
|
1154
1153
|
o.value,
|
|
1155
1154
|
a.value
|
|
1156
|
-
), l.value =
|
|
1155
|
+
), l.value = Ot(
|
|
1157
1156
|
e.value,
|
|
1158
1157
|
c,
|
|
1159
1158
|
o.value,
|
|
1160
1159
|
a.value.startOnZero
|
|
1161
1160
|
)));
|
|
1162
1161
|
}
|
|
1163
|
-
return
|
|
1162
|
+
return St(i), { xScale: u, yScale: l };
|
|
1164
1163
|
}
|
|
1165
|
-
function
|
|
1166
|
-
const a = [0, n], { padding:
|
|
1164
|
+
function Lt(e, n, t, o) {
|
|
1165
|
+
const a = [0, n], { padding: u, paddingInner: l, paddingOuter: i } = o, s = u ?? (t === H.HORIZONTAL ? zt : Ft);
|
|
1167
1166
|
return Object.assign(
|
|
1168
|
-
|
|
1167
|
+
Ee().range(a).paddingInner(l ?? s).paddingOuter(i ?? s).domain(e.map((c, p) => p)),
|
|
1169
1168
|
{ labels: e }
|
|
1170
1169
|
);
|
|
1171
1170
|
}
|
|
1172
|
-
function
|
|
1173
|
-
const a =
|
|
1171
|
+
function Ot(e, n, t, o) {
|
|
1172
|
+
const a = Gt(e).filter((p) => p != null), u = [0, n];
|
|
1174
1173
|
if (a.length === 0)
|
|
1175
|
-
return
|
|
1176
|
-
const l = Math.min(...a), i = o && l > 0 ? 0 : l, s = Math.max(...a), c = t ===
|
|
1177
|
-
return
|
|
1174
|
+
return Ne().range(u).domain([0, 0]).nice();
|
|
1175
|
+
const l = Math.min(...a), i = o && l > 0 ? 0 : l, s = Math.max(...a), c = t === H.HORIZONTAL ? [i, s] : [s, i];
|
|
1176
|
+
return Ne().range(u).domain(c).nice();
|
|
1178
1177
|
}
|
|
1179
|
-
function
|
|
1178
|
+
function xt(e) {
|
|
1180
1179
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
1181
1180
|
}
|
|
1182
1181
|
function Ye(e, n) {
|
|
1183
|
-
return
|
|
1182
|
+
return de(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
1184
1183
|
}
|
|
1185
|
-
function
|
|
1184
|
+
function $t(e, n, {
|
|
1186
1185
|
padding: t,
|
|
1187
1186
|
paddingInner: o,
|
|
1188
1187
|
paddingOuter: a
|
|
1189
1188
|
} = {}) {
|
|
1190
|
-
const
|
|
1191
|
-
return e.copy().paddingInner(o ??
|
|
1189
|
+
const u = t ?? (n === H.HORIZONTAL ? zt : Ft);
|
|
1190
|
+
return e.copy().paddingInner(o ?? u).paddingOuter(a ?? u);
|
|
1192
1191
|
}
|
|
1193
|
-
function
|
|
1194
|
-
return Object.values(
|
|
1192
|
+
function Yt(e) {
|
|
1193
|
+
return Object.values(H).includes(e);
|
|
1195
1194
|
}
|
|
1196
|
-
const
|
|
1197
|
-
...
|
|
1198
|
-
...
|
|
1199
|
-
...
|
|
1195
|
+
const Ie = (e, n = !0) => ({
|
|
1196
|
+
...rt(e),
|
|
1197
|
+
...Vo(),
|
|
1198
|
+
...He(),
|
|
1200
1199
|
classList: {
|
|
1201
1200
|
type: [String, Array],
|
|
1202
1201
|
default: () => []
|
|
@@ -1208,18 +1207,18 @@ const $e = (e, n = !0) => ({
|
|
|
1208
1207
|
...n ? {
|
|
1209
1208
|
orientation: {
|
|
1210
1209
|
type: String,
|
|
1211
|
-
default:
|
|
1212
|
-
validator:
|
|
1210
|
+
default: H.VERTICAL,
|
|
1211
|
+
validator: Yt
|
|
1213
1212
|
}
|
|
1214
1213
|
} : {}
|
|
1215
|
-
}),
|
|
1216
|
-
...
|
|
1217
|
-
...
|
|
1214
|
+
}), Fo = (e) => ({
|
|
1215
|
+
...rt(e),
|
|
1216
|
+
...He(),
|
|
1218
1217
|
hoveredElement: {
|
|
1219
1218
|
type: [Number, String],
|
|
1220
1219
|
default: null
|
|
1221
1220
|
}
|
|
1222
|
-
}),
|
|
1221
|
+
}), Ve = () => ({
|
|
1223
1222
|
data: {
|
|
1224
1223
|
type: Array,
|
|
1225
1224
|
required: !0
|
|
@@ -1234,8 +1233,8 @@ const $e = (e, n = !0) => ({
|
|
|
1234
1233
|
},
|
|
1235
1234
|
orientation: {
|
|
1236
1235
|
type: String,
|
|
1237
|
-
default:
|
|
1238
|
-
validator:
|
|
1236
|
+
default: H.VERTICAL,
|
|
1237
|
+
validator: Yt
|
|
1239
1238
|
},
|
|
1240
1239
|
xScale: {
|
|
1241
1240
|
type: Function,
|
|
@@ -1261,22 +1260,22 @@ const $e = (e, n = !0) => ({
|
|
|
1261
1260
|
type: [String, Array],
|
|
1262
1261
|
default: () => []
|
|
1263
1262
|
}
|
|
1264
|
-
}),
|
|
1263
|
+
}), zo = { class: "lume-overlay-group" }, Wo = /* @__PURE__ */ Z({
|
|
1265
1264
|
__name: "lume-overlay-group",
|
|
1266
1265
|
props: {
|
|
1267
|
-
...
|
|
1266
|
+
...Ve(),
|
|
1268
1267
|
orientation: {
|
|
1269
1268
|
type: String,
|
|
1270
|
-
default:
|
|
1269
|
+
default: H.VERTICAL
|
|
1271
1270
|
}
|
|
1272
1271
|
},
|
|
1273
1272
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1274
1273
|
setup(e, { emit: n }) {
|
|
1275
|
-
const t = e, o = n, { data: a, orientation:
|
|
1274
|
+
const t = e, o = n, { data: a, orientation: u, xScale: l, yScale: i } = te(t), s = v(() => Ue(a));
|
|
1276
1275
|
function c(p) {
|
|
1277
1276
|
var b;
|
|
1278
|
-
const
|
|
1279
|
-
return
|
|
1277
|
+
const r = u.value === H.HORIZONTAL ? i.value : l.value, f = r.domain(), g = $n(r), m = ((b = r.paddingInner) == null ? void 0 : b.call(r)) ?? 0, T = g * m, O = de(r) ? r(f[p]) - T / 2 : r(p) - g / 2;
|
|
1278
|
+
return u.value === H.HORIZONTAL ? {
|
|
1280
1279
|
width: Math.max(...l.value.range()),
|
|
1281
1280
|
height: g,
|
|
1282
1281
|
transform: `translate(0, ${O})`
|
|
@@ -1286,8 +1285,8 @@ const $e = (e, n = !0) => ({
|
|
|
1286
1285
|
transform: `translate(${O}, 0)`
|
|
1287
1286
|
};
|
|
1288
1287
|
}
|
|
1289
|
-
return (p,
|
|
1290
|
-
(
|
|
1288
|
+
return (p, r) => (_(), x("g", zo, [
|
|
1289
|
+
(_(!0), x(q, null, W(s.value, (f, g) => (_(), K(d(ut), j(c(g), {
|
|
1291
1290
|
key: `overlay-${g}`,
|
|
1292
1291
|
"data-j-lume-overlay-group": g,
|
|
1293
1292
|
transition: !1,
|
|
@@ -1297,22 +1296,22 @@ const $e = (e, n = !0) => ({
|
|
|
1297
1296
|
}), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
|
|
1298
1297
|
]));
|
|
1299
1298
|
}
|
|
1300
|
-
}),
|
|
1301
|
-
function t(
|
|
1299
|
+
}), ye = (e, n) => {
|
|
1300
|
+
function t(u, ...l) {
|
|
1302
1301
|
}
|
|
1303
|
-
function o(
|
|
1302
|
+
function o(u, l) {
|
|
1304
1303
|
}
|
|
1305
1304
|
return { componentEventPropagator: {}, emitInternalEvent: t, listenInternalEvent: o };
|
|
1306
1305
|
};
|
|
1307
|
-
function
|
|
1306
|
+
function Zo(e) {
|
|
1308
1307
|
return { hasNegativeValues: v(
|
|
1309
|
-
() =>
|
|
1308
|
+
() => Gt(e.value).some((t) => t < 0)
|
|
1310
1309
|
) };
|
|
1311
1310
|
}
|
|
1312
|
-
function
|
|
1311
|
+
function Uo(e, n, t, o) {
|
|
1313
1312
|
const a = v(
|
|
1314
|
-
() => o.value ===
|
|
1315
|
-
),
|
|
1313
|
+
() => o.value === H.HORIZONTAL
|
|
1314
|
+
), u = v(
|
|
1316
1315
|
() => {
|
|
1317
1316
|
var c;
|
|
1318
1317
|
return e.height - (a != null && a.value ? 0 : ((c = t.value) == null ? void 0 : c.call(t, 0)) || 0);
|
|
@@ -1330,29 +1329,29 @@ function Zo(e, n, t, o) {
|
|
|
1330
1329
|
);
|
|
1331
1330
|
return { negativeBarAttributes: v(() => ({
|
|
1332
1331
|
width: l.value,
|
|
1333
|
-
height:
|
|
1332
|
+
height: u.value,
|
|
1334
1333
|
transform: i.value
|
|
1335
1334
|
})) };
|
|
1336
1335
|
}
|
|
1337
|
-
function
|
|
1336
|
+
function Kt(e, n) {
|
|
1338
1337
|
const t = n - e.length;
|
|
1339
1338
|
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
1340
1339
|
}
|
|
1341
|
-
function
|
|
1342
|
-
return e.reduce((t, o) =>
|
|
1340
|
+
function Xo(e, n) {
|
|
1341
|
+
return e.reduce((t, o) => Kt(o.values, n).map((a, u) => t[u] ? a.value > t[u] ? a.value : t[u] : a.value ?? 0), []);
|
|
1343
1342
|
}
|
|
1344
|
-
function
|
|
1345
|
-
return e.reduce((t, o) =>
|
|
1346
|
-
(a,
|
|
1343
|
+
function Yo(e, n) {
|
|
1344
|
+
return e.reduce((t, o) => Kt(o.values, n).map(
|
|
1345
|
+
(a, u) => {
|
|
1347
1346
|
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1348
|
-
return t[
|
|
1347
|
+
return t[u] ? t[u] + l : l;
|
|
1349
1348
|
}
|
|
1350
1349
|
), []);
|
|
1351
1350
|
}
|
|
1352
|
-
const
|
|
1353
|
-
"stacked-bar":
|
|
1351
|
+
const It = {
|
|
1352
|
+
"stacked-bar": Yo
|
|
1354
1353
|
};
|
|
1355
|
-
function
|
|
1354
|
+
function Jt(e, n, t, o, a, u, l, i) {
|
|
1356
1355
|
const s = v(
|
|
1357
1356
|
() => {
|
|
1358
1357
|
var p;
|
|
@@ -1361,25 +1360,25 @@ function Xt(e, n, t, o, a, r, l, i) {
|
|
|
1361
1360
|
);
|
|
1362
1361
|
function c(p) {
|
|
1363
1362
|
var g;
|
|
1364
|
-
const
|
|
1363
|
+
const r = ((g = i == null ? void 0 : i.value) == null ? void 0 : g.length) ?? 0, f = l != null && l.value && It[l.value] ? It[l.value](
|
|
1365
1364
|
p,
|
|
1366
|
-
|
|
1367
|
-
) :
|
|
1365
|
+
r
|
|
1366
|
+
) : Xo(p, r);
|
|
1368
1367
|
e.value = f.map((m, T) => ({
|
|
1369
|
-
cx: (a == null ? void 0 : a.value) ===
|
|
1370
|
-
cy: (a == null ? void 0 : a.value) ===
|
|
1368
|
+
cx: (a == null ? void 0 : a.value) === H.HORIZONTAL ? t.value(m) : Ye(t.value, T),
|
|
1369
|
+
cy: (a == null ? void 0 : a.value) === H.HORIZONTAL ? Ye(o.value, T) : o.value(m)
|
|
1371
1370
|
}));
|
|
1372
1371
|
}
|
|
1373
|
-
return
|
|
1372
|
+
return Y(
|
|
1374
1373
|
[t, o],
|
|
1375
1374
|
() => {
|
|
1376
|
-
t.value && o.value && (
|
|
1375
|
+
t.value && o.value && (u != null && u.value) && s.value && c(u.value);
|
|
1377
1376
|
},
|
|
1378
1377
|
{ immediate: !0 }
|
|
1379
1378
|
), { shouldGenerateTooltipAnchors: s, updateTooltipAnchorAttributes: c };
|
|
1380
1379
|
}
|
|
1381
|
-
function
|
|
1382
|
-
const e =
|
|
1380
|
+
function Ko() {
|
|
1381
|
+
const e = Ge({
|
|
1383
1382
|
opened: !1,
|
|
1384
1383
|
targetElement: null
|
|
1385
1384
|
});
|
|
@@ -1389,19 +1388,19 @@ function Xo() {
|
|
|
1389
1388
|
e.opened = !1, e.targetElement = null;
|
|
1390
1389
|
} };
|
|
1391
1390
|
}
|
|
1392
|
-
function
|
|
1391
|
+
function Jo(e) {
|
|
1393
1392
|
return { getTooltipItems: v(
|
|
1394
|
-
() => (t) => e.value.map(({ color: o, label: a, values:
|
|
1393
|
+
() => (t) => e.value.map(({ color: o, label: a, values: u }) => {
|
|
1395
1394
|
var l, i, s;
|
|
1396
1395
|
return {
|
|
1397
|
-
color: ((l =
|
|
1396
|
+
color: ((l = u[t]) == null ? void 0 : l.color) || o,
|
|
1398
1397
|
label: a,
|
|
1399
|
-
value: ((i =
|
|
1398
|
+
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((s = u[t]) == null ? void 0 : s.value) ?? Pt
|
|
1400
1399
|
};
|
|
1401
1400
|
})
|
|
1402
1401
|
) };
|
|
1403
1402
|
}
|
|
1404
|
-
const Ke = 16, Je = 8, Qe = 28, qe = 24,
|
|
1403
|
+
const Ke = 16, Je = 8, Qe = 28, qe = 24, Te = {
|
|
1405
1404
|
VERTICAL: {
|
|
1406
1405
|
top: Ke,
|
|
1407
1406
|
right: Je,
|
|
@@ -1415,181 +1414,181 @@ const Ke = 16, Je = 8, Qe = 28, qe = 24, ke = {
|
|
|
1415
1414
|
left: qe
|
|
1416
1415
|
}
|
|
1417
1416
|
};
|
|
1418
|
-
function
|
|
1417
|
+
function Qo(e) {
|
|
1419
1418
|
return !e || e === "auto" || e.top == null || e.top === "auto" ? Ke : e.top;
|
|
1420
1419
|
}
|
|
1421
|
-
function
|
|
1420
|
+
function qo(e) {
|
|
1422
1421
|
return !e || e === "auto" || e.right == null || e.right === "auto" ? Je : e.right;
|
|
1423
1422
|
}
|
|
1424
|
-
function
|
|
1423
|
+
function ea(e, n) {
|
|
1425
1424
|
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n || Qe : e.bottom;
|
|
1426
1425
|
}
|
|
1427
|
-
function
|
|
1426
|
+
function ta(e, n) {
|
|
1428
1427
|
return !e || e === "auto" || e.left == null || e.left === "auto" ? n || qe : e.left;
|
|
1429
1428
|
}
|
|
1430
|
-
const
|
|
1429
|
+
const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-section" }, aa = {
|
|
1431
1430
|
key: 0,
|
|
1432
1431
|
class: "lume-chart__title lume-chart-title lume-typography--display"
|
|
1433
|
-
},
|
|
1432
|
+
}, la = { class: "lume-chart__controls" }, ua = { class: "lume-chart__header-section" }, ra = {
|
|
1434
1433
|
key: 0,
|
|
1435
1434
|
class: "lume-chart__axis-title lume-axis-title lume-typography--body"
|
|
1436
|
-
},
|
|
1435
|
+
}, ia = { key: 3 }, sa = ["r"], ca = {
|
|
1437
1436
|
key: 0,
|
|
1438
1437
|
class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
|
|
1439
|
-
},
|
|
1438
|
+
}, da = /* @__PURE__ */ Z({
|
|
1440
1439
|
__name: "lume-chart",
|
|
1441
1440
|
props: {
|
|
1442
|
-
|
|
1441
|
+
...Ie(),
|
|
1443
1442
|
chartType: {
|
|
1444
1443
|
type: String,
|
|
1445
1444
|
default: null
|
|
1446
1445
|
}
|
|
1447
1446
|
},
|
|
1448
1447
|
setup(e, { emit: n }) {
|
|
1449
|
-
const t = e, o =
|
|
1450
|
-
|
|
1448
|
+
const t = e, o = ue(), a = n, { data: u, labels: l, color: i, options: s, orientation: c, chartType: p } = te(t), r = R(-1), f = R(null), g = R(null), m = R([]), T = R(null), O = R(0), b = R(0), { allOptions: h } = me(s), { internalData: $, computedLabels: w, containerSize: N, updateSize: E, chartID: D } = it(u, l, i, h, c), { xScale: V, yScale: U } = Po(
|
|
1449
|
+
$,
|
|
1451
1450
|
w,
|
|
1452
|
-
|
|
1451
|
+
N,
|
|
1453
1452
|
c,
|
|
1454
1453
|
h
|
|
1455
|
-
),
|
|
1456
|
-
top:
|
|
1457
|
-
right:
|
|
1458
|
-
bottom:
|
|
1459
|
-
left:
|
|
1454
|
+
), ne = v(() => ({
|
|
1455
|
+
top: Qo(h.value.margins),
|
|
1456
|
+
right: qo(h.value.margins),
|
|
1457
|
+
bottom: ea(h.value.margins, O.value),
|
|
1458
|
+
left: ta(h.value.margins, b.value)
|
|
1460
1459
|
})), F = v(() => {
|
|
1461
1460
|
var L;
|
|
1462
|
-
return t.xScale ?
|
|
1463
|
-
}),
|
|
1461
|
+
return t.xScale ? xt(t.xScale) ? t.xScale : (L = t.xScale) == null ? void 0 : L.call(t, $.value, l.value, N) : V.value;
|
|
1462
|
+
}), Q = v(() => {
|
|
1464
1463
|
var L;
|
|
1465
|
-
return t.yScale ?
|
|
1466
|
-
}),
|
|
1464
|
+
return t.yScale ? xt(t.yScale) ? t.yScale : (L = t.yScale) == null ? void 0 : L.call(t, $.value, l.value, N) : U.value;
|
|
1465
|
+
}), Oe = v(() => ({
|
|
1467
1466
|
...h.value.xAxisOptions,
|
|
1468
|
-
withHover: c.value ===
|
|
1469
|
-
})),
|
|
1467
|
+
withHover: c.value === H.VERTICAL
|
|
1468
|
+
})), xe = v(() => ({
|
|
1470
1469
|
...h.value.yAxisOptions,
|
|
1471
|
-
withHover: c.value ===
|
|
1472
|
-
})),
|
|
1470
|
+
withHover: c.value === H.HORIZONTAL
|
|
1471
|
+
})), ke = v(() => {
|
|
1473
1472
|
var L;
|
|
1474
1473
|
return (L = h.value.xAxisOptions) == null ? void 0 : L.title;
|
|
1475
|
-
}),
|
|
1474
|
+
}), S = v(() => {
|
|
1476
1475
|
var L;
|
|
1477
1476
|
return (L = h.value.yAxisOptions) == null ? void 0 : L.title;
|
|
1478
|
-
}),
|
|
1477
|
+
}), M = v(() => {
|
|
1479
1478
|
var L;
|
|
1480
|
-
return ((L = h.value.xAxisOptions) == null ? void 0 : L.withTitle) !== !1 &&
|
|
1481
|
-
}),
|
|
1479
|
+
return ((L = h.value.xAxisOptions) == null ? void 0 : L.withTitle) !== !1 && ke.value;
|
|
1480
|
+
}), k = v(() => {
|
|
1482
1481
|
var L;
|
|
1483
|
-
return ((L = h.value.yAxisOptions) == null ? void 0 : L.withTitle) !== !1 &&
|
|
1484
|
-
}),
|
|
1485
|
-
() =>
|
|
1486
|
-
),
|
|
1482
|
+
return ((L = h.value.yAxisOptions) == null ? void 0 : L.withTitle) !== !1 && S.value;
|
|
1483
|
+
}), B = v(
|
|
1484
|
+
() => u.value.every((L) => !L.values.length)
|
|
1485
|
+
), y = v(() => {
|
|
1487
1486
|
const L = [], { noBaseScales: A } = h.value;
|
|
1488
|
-
return A || L.push(() => !!(F.value &&
|
|
1489
|
-
}), { hasNegativeValues:
|
|
1490
|
-
|
|
1487
|
+
return A || L.push(() => !!(F.value && Q.value)), L.every((I) => I() === !0);
|
|
1488
|
+
}), { hasNegativeValues: X } = Zo($), { negativeBarAttributes: J } = Uo(
|
|
1489
|
+
N,
|
|
1491
1490
|
F,
|
|
1492
|
-
|
|
1491
|
+
Q,
|
|
1493
1492
|
c
|
|
1494
|
-
), { shouldGenerateTooltipAnchors:
|
|
1493
|
+
), { shouldGenerateTooltipAnchors: se } = Jt(
|
|
1495
1494
|
m,
|
|
1496
1495
|
h,
|
|
1497
1496
|
F,
|
|
1498
|
-
|
|
1497
|
+
Q,
|
|
1499
1498
|
c,
|
|
1500
|
-
|
|
1499
|
+
$,
|
|
1501
1500
|
p,
|
|
1502
1501
|
l
|
|
1503
|
-
), { tooltipConfig:
|
|
1504
|
-
() => h.value.withTooltip !== !1 &&
|
|
1505
|
-
),
|
|
1502
|
+
), { tooltipConfig: be, showTooltip: ct, hideTooltip: Re } = Ko(), { getTooltipItems: dt } = Jo($), an = v(
|
|
1503
|
+
() => h.value.withTooltip !== !1 && be.opened
|
|
1504
|
+
), vt = v(
|
|
1506
1505
|
() => {
|
|
1507
1506
|
var L;
|
|
1508
1507
|
return ((L = h.value.tooltipOptions) == null ? void 0 : L.position) || "top";
|
|
1509
1508
|
}
|
|
1510
|
-
),
|
|
1509
|
+
), ln = v(() => {
|
|
1511
1510
|
var A;
|
|
1512
1511
|
const L = (A = h.value.tooltipOptions) == null ? void 0 : A.withPointerEvents;
|
|
1513
|
-
return
|
|
1512
|
+
return be.opened && (!L || L && T.value === !1);
|
|
1514
1513
|
});
|
|
1515
|
-
function
|
|
1514
|
+
function Se(L) {
|
|
1516
1515
|
var I;
|
|
1517
|
-
if (L ===
|
|
1516
|
+
if (L === r.value)
|
|
1518
1517
|
return;
|
|
1519
|
-
const A =
|
|
1520
|
-
if (h.value.withHover !== !1 && (
|
|
1518
|
+
const A = r.value;
|
|
1519
|
+
if (h.value.withHover !== !1 && (r.value = L), h.value.withTooltip !== !1) {
|
|
1521
1520
|
const Pe = (I = h.value.tooltipOptions) != null && I.targetElement ? h.value.tooltipOptions.targetElement === "self" ? g.value.$el : h.value.tooltipOptions.targetElement : f.value[L];
|
|
1522
|
-
|
|
1521
|
+
ct(Pe);
|
|
1523
1522
|
}
|
|
1524
1523
|
a("hovered-index-changed", { newIndex: L, oldIndex: A });
|
|
1525
1524
|
}
|
|
1526
|
-
function
|
|
1527
|
-
|
|
1525
|
+
function mt() {
|
|
1526
|
+
Re(), r.value = -1;
|
|
1528
1527
|
}
|
|
1529
|
-
function
|
|
1530
|
-
if (!
|
|
1528
|
+
function pt(L) {
|
|
1529
|
+
if (!u.value.some(
|
|
1531
1530
|
({ values: I }) => L <= I.length - 1
|
|
1532
1531
|
)) {
|
|
1533
|
-
|
|
1532
|
+
ge(ve.InvalidHoveredIndex);
|
|
1534
1533
|
return;
|
|
1535
1534
|
}
|
|
1536
|
-
|
|
1535
|
+
Se(L);
|
|
1537
1536
|
}
|
|
1538
|
-
function
|
|
1537
|
+
function un() {
|
|
1539
1538
|
setTimeout(() => {
|
|
1540
|
-
|
|
1539
|
+
ln.value && mt(), a("chart-mouseleave");
|
|
1541
1540
|
}, 0);
|
|
1542
1541
|
}
|
|
1543
|
-
function pt({ index: L, value: A, event: I }) {
|
|
1544
|
-
L !== null && Re(L), a("axis-mouseenter", { index: L, value: A, event: I });
|
|
1545
|
-
}
|
|
1546
1542
|
function ft({ index: L, value: A, event: I }) {
|
|
1543
|
+
L !== null && Se(L), a("axis-mouseenter", { index: L, value: A, event: I });
|
|
1544
|
+
}
|
|
1545
|
+
function ht({ index: L, value: A, event: I }) {
|
|
1547
1546
|
a("axis-click", { index: L, value: A, event: I });
|
|
1548
1547
|
}
|
|
1549
|
-
return
|
|
1550
|
-
|
|
1548
|
+
return Y(
|
|
1549
|
+
u,
|
|
1551
1550
|
(L, A) => a("data-changed", { newValue: L, oldValue: A })
|
|
1552
|
-
),
|
|
1551
|
+
), Y(
|
|
1553
1552
|
l,
|
|
1554
1553
|
(L, A) => a("labels-changed", { newValue: L, oldValue: A })
|
|
1555
|
-
),
|
|
1554
|
+
), Y(B, (L) => L && ge(ve.Empty), { immediate: !0 }), Y(() => t.hoveredIndex, pt), Y(
|
|
1556
1555
|
m,
|
|
1557
1556
|
(L) => {
|
|
1558
|
-
L && t.hoveredIndex != null &&
|
|
1557
|
+
L && t.hoveredIndex != null && r.value === -1 && pt(t.hoveredIndex);
|
|
1559
1558
|
},
|
|
1560
1559
|
{ flush: "post" }
|
|
1561
|
-
),
|
|
1562
|
-
L === !1 &&
|
|
1563
|
-
}),
|
|
1560
|
+
), Y(T, (L) => {
|
|
1561
|
+
L === !1 && be.opened && mt();
|
|
1562
|
+
}), _e(async () => {
|
|
1564
1563
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1565
|
-
}), Fe("chartID",
|
|
1566
|
-
id: `lume-chart_${d(
|
|
1564
|
+
}), Fe("chartID", D), Fe("isEmpty", B), Fe("tooltipAnchorAttributes", m), (L, A) => (_(), K(d(uo), {
|
|
1565
|
+
id: `lume-chart_${d(D)}`,
|
|
1567
1566
|
ref_key: "chartContainer",
|
|
1568
1567
|
ref: g,
|
|
1569
|
-
margins:
|
|
1570
|
-
"container-size": d(
|
|
1568
|
+
margins: ne.value,
|
|
1569
|
+
"container-size": d(N),
|
|
1571
1570
|
"no-min-size": d(h).noMinSize,
|
|
1572
1571
|
"transparent-background": d(h).transparentBackground,
|
|
1573
1572
|
"data-j-lume-chart": "",
|
|
1574
|
-
onResize: d(
|
|
1573
|
+
onResize: d(E),
|
|
1575
1574
|
onClick: A[24] || (A[24] = (I) => a("chart-click", I)),
|
|
1576
1575
|
onMouseenter: A[25] || (A[25] = (I) => a("chart-mouseenter", I)),
|
|
1577
|
-
onMouseleave:
|
|
1576
|
+
onMouseleave: un
|
|
1578
1577
|
}, {
|
|
1579
1578
|
header: P(() => [
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
L.title ? (
|
|
1583
|
-
|
|
1584
|
-
|
|
1579
|
+
G("div", na, [
|
|
1580
|
+
G("div", oa, [
|
|
1581
|
+
L.title ? (_(), x("h1", aa, ae(L.title), 1)) : z("", !0),
|
|
1582
|
+
G("div", la, [
|
|
1583
|
+
C(L.$slots, "controls", {}, void 0, !0)
|
|
1585
1584
|
])
|
|
1586
1585
|
]),
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (
|
|
1586
|
+
G("div", ua, [
|
|
1587
|
+
k.value ? (_(), x("h3", ra, ae(S.value), 1)) : z("", !0),
|
|
1588
|
+
C(L.$slots, "legend", { data: d($) }, () => [
|
|
1589
|
+
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (_(), K(d(bt), {
|
|
1591
1590
|
key: 0,
|
|
1592
|
-
data: d(
|
|
1591
|
+
data: d($),
|
|
1593
1592
|
class: "lume-chart__legend",
|
|
1594
1593
|
"data-j-lume-chart__legend": "",
|
|
1595
1594
|
onClick: A[0] || (A[0] = (I) => a("legend-click", I)),
|
|
@@ -1601,10 +1600,10 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1601
1600
|
])
|
|
1602
1601
|
]),
|
|
1603
1602
|
footer: P(() => [
|
|
1604
|
-
|
|
1605
|
-
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (
|
|
1603
|
+
M.value ? (_(), x("h3", ca, ae(ke.value), 1)) : z("", !0),
|
|
1604
|
+
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (_(), K(d(bt), {
|
|
1606
1605
|
key: 1,
|
|
1607
|
-
data: d(
|
|
1606
|
+
data: d($),
|
|
1608
1607
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1609
1608
|
"data-j-lume-chart__legend": "",
|
|
1610
1609
|
onClick: A[16] || (A[16] = (I) => a("legend-click", I)),
|
|
@@ -1613,30 +1612,30 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1613
1612
|
}, null, 8, ["data"])) : z("", !0)
|
|
1614
1613
|
]),
|
|
1615
1614
|
extra: P(() => [
|
|
1616
|
-
|
|
1617
|
-
data: d(
|
|
1615
|
+
C(L.$slots, "tooltip", j(d(be), {
|
|
1616
|
+
data: d($),
|
|
1618
1617
|
labels: d(w),
|
|
1619
|
-
title: d(w)[
|
|
1620
|
-
items: d(
|
|
1621
|
-
position:
|
|
1618
|
+
title: d(w)[r.value],
|
|
1619
|
+
items: d(dt)(r.value),
|
|
1620
|
+
position: vt.value,
|
|
1622
1621
|
withTooltip: d(h).withTooltip !== !1,
|
|
1623
|
-
hoveredIndex:
|
|
1622
|
+
hoveredIndex: r.value,
|
|
1624
1623
|
handleMouseEnter: () => T.value = !0,
|
|
1625
1624
|
handleMouseLeave: () => T.value = !1,
|
|
1626
1625
|
options: d(h).tooltipOptions
|
|
1627
1626
|
}), () => [
|
|
1628
|
-
|
|
1629
|
-
position:
|
|
1630
|
-
title: d(w)[
|
|
1631
|
-
items: d(
|
|
1627
|
+
an.value ? (_(), K(d(Eo), j({ key: 0 }, d(be), {
|
|
1628
|
+
position: vt.value,
|
|
1629
|
+
title: d(w)[r.value],
|
|
1630
|
+
items: d(dt)(r.value),
|
|
1632
1631
|
options: d(h).tooltipOptions,
|
|
1633
1632
|
"data-j-lume-chart__tooltip": "",
|
|
1634
1633
|
onOpened: A[19] || (A[19] = (I) => a("tooltip-opened", {
|
|
1635
|
-
index:
|
|
1634
|
+
index: r.value,
|
|
1636
1635
|
targetElement: I
|
|
1637
1636
|
})),
|
|
1638
1637
|
onMoved: A[20] || (A[20] = (I) => a("tooltip-moved", {
|
|
1639
|
-
index:
|
|
1638
|
+
index: r.value,
|
|
1640
1639
|
targetElement: I
|
|
1641
1640
|
})),
|
|
1642
1641
|
onClosed: A[21] || (A[21] = (I) => a("tooltip-closed")),
|
|
@@ -1644,10 +1643,10 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1644
1643
|
onTooltipMouseleave: A[23] || (A[23] = (I) => T.value = !1)
|
|
1645
1644
|
}), {
|
|
1646
1645
|
default: P(() => [
|
|
1647
|
-
|
|
1648
|
-
data: d(
|
|
1646
|
+
C(L.$slots, "tooltip-content", {
|
|
1647
|
+
data: d($),
|
|
1649
1648
|
labels: d(w),
|
|
1650
|
-
hoveredIndex:
|
|
1649
|
+
hoveredIndex: r.value
|
|
1651
1650
|
}, void 0, !0)
|
|
1652
1651
|
]),
|
|
1653
1652
|
_: 3
|
|
@@ -1655,75 +1654,75 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1655
1654
|
], !0)
|
|
1656
1655
|
]),
|
|
1657
1656
|
default: P(() => [
|
|
1658
|
-
|
|
1659
|
-
d(
|
|
1657
|
+
y.value ? (_(), x(q, { key: 0 }, [
|
|
1658
|
+
d(X) ? (_(), K(d(ut), j({ key: 0 }, d(J), {
|
|
1660
1659
|
"class-list": "lume-fill--negative",
|
|
1661
1660
|
transition: !1,
|
|
1662
1661
|
"data-j-lume-chart__negative-values": ""
|
|
1663
1662
|
}), null, 16)) : z("", !0),
|
|
1664
|
-
d(h).withAxes !== !1 ?
|
|
1663
|
+
d(h).withAxes !== !1 ? C(L.$slots, "axes", {
|
|
1665
1664
|
key: 1,
|
|
1666
1665
|
xScale: F.value,
|
|
1667
|
-
yScale:
|
|
1668
|
-
containerSize: d(
|
|
1666
|
+
yScale: Q.value,
|
|
1667
|
+
containerSize: d(N),
|
|
1669
1668
|
options: d(h),
|
|
1670
|
-
hoveredIndex:
|
|
1669
|
+
hoveredIndex: r.value
|
|
1671
1670
|
}, () => [
|
|
1672
|
-
re(d(
|
|
1671
|
+
re(d(kt), {
|
|
1673
1672
|
type: "x",
|
|
1674
1673
|
scale: F.value,
|
|
1675
|
-
"container-size": d(
|
|
1676
|
-
options:
|
|
1677
|
-
"hovered-index":
|
|
1674
|
+
"container-size": d(N),
|
|
1675
|
+
options: Oe.value,
|
|
1676
|
+
"hovered-index": r.value,
|
|
1678
1677
|
orientation: d(c),
|
|
1679
1678
|
"data-j-lume-chart__x-axis": "",
|
|
1680
|
-
onClick:
|
|
1681
|
-
onMouseenter:
|
|
1679
|
+
onClick: ht,
|
|
1680
|
+
onMouseenter: ft,
|
|
1682
1681
|
onMouseleave: A[3] || (A[3] = (I) => a("axis-mouseleave")),
|
|
1683
1682
|
"onLume__internal-AxisSize": A[4] || (A[4] = (I) => O.value = I)
|
|
1684
1683
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1685
|
-
re(d(
|
|
1684
|
+
re(d(kt), {
|
|
1686
1685
|
type: "y",
|
|
1687
|
-
scale:
|
|
1688
|
-
"container-size": d(
|
|
1689
|
-
options:
|
|
1690
|
-
"hovered-index":
|
|
1686
|
+
scale: Q.value,
|
|
1687
|
+
"container-size": d(N),
|
|
1688
|
+
options: xe.value,
|
|
1689
|
+
"hovered-index": r.value,
|
|
1691
1690
|
orientation: d(c),
|
|
1692
1691
|
"data-j-lume-chart__y-axis": "",
|
|
1693
|
-
onClick:
|
|
1694
|
-
onMouseenter:
|
|
1692
|
+
onClick: ht,
|
|
1693
|
+
onMouseenter: ft,
|
|
1695
1694
|
onMouseleave: A[5] || (A[5] = (I) => a("axis-mouseleave")),
|
|
1696
1695
|
"onLume__internal-AxisSize": A[6] || (A[6] = (I) => b.value = I)
|
|
1697
1696
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1698
1697
|
], !0) : z("", !0),
|
|
1699
|
-
d(h).withHover !== !1 ? (
|
|
1698
|
+
d(h).withHover !== !1 ? (_(), K(d(Wo), {
|
|
1700
1699
|
key: 2,
|
|
1701
|
-
data: d(
|
|
1700
|
+
data: d($),
|
|
1702
1701
|
orientation: d(c),
|
|
1703
1702
|
"x-scale": F.value,
|
|
1704
|
-
"y-scale":
|
|
1703
|
+
"y-scale": Q.value,
|
|
1705
1704
|
"data-j-lume-chart__overlay-group": "",
|
|
1706
|
-
"onLume__internal-Hover":
|
|
1705
|
+
"onLume__internal-Hover": Se
|
|
1707
1706
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
|
|
1708
|
-
d(
|
|
1709
|
-
(
|
|
1707
|
+
d(se) ? (_(), x("g", ia, [
|
|
1708
|
+
(_(!0), x(q, null, W(m.value, (I, Pe) => (_(), x("circle", j(I, {
|
|
1710
1709
|
ref_for: !0,
|
|
1711
1710
|
ref_key: "tooltipAnchor",
|
|
1712
1711
|
ref: f,
|
|
1713
1712
|
key: `anchor_${Pe}`,
|
|
1714
|
-
r: d(
|
|
1713
|
+
r: d(Gn),
|
|
1715
1714
|
class: "lume-fill--transparent"
|
|
1716
|
-
}), null, 16,
|
|
1715
|
+
}), null, 16, sa))), 128))
|
|
1717
1716
|
])) : z("", !0),
|
|
1718
|
-
|
|
1719
|
-
data: d(
|
|
1717
|
+
C(L.$slots, "groups", {
|
|
1718
|
+
data: d($),
|
|
1720
1719
|
labels: d(w),
|
|
1721
1720
|
options: d(h),
|
|
1722
1721
|
orientation: d(c),
|
|
1723
1722
|
xScale: F.value,
|
|
1724
|
-
yScale:
|
|
1725
|
-
hoveredIndex:
|
|
1726
|
-
containerSize: d(
|
|
1723
|
+
yScale: Q.value,
|
|
1724
|
+
hoveredIndex: r.value,
|
|
1725
|
+
containerSize: d(N),
|
|
1727
1726
|
transition: d(h).withTransition !== !1,
|
|
1728
1727
|
classList: L.classList,
|
|
1729
1728
|
onNodeClick: A[7] || (A[7] = (I) => a("node-click", I)),
|
|
@@ -1735,7 +1734,7 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1735
1734
|
onBarClick: A[13] || (A[13] = (I) => a("bar-click", I)),
|
|
1736
1735
|
onLineClick: A[14] || (A[14] = (I) => a("line-click", I)),
|
|
1737
1736
|
onPointClick: A[15] || (A[15] = (I) => a("point-click", I)),
|
|
1738
|
-
"onLume__internal-Hover":
|
|
1737
|
+
"onLume__internal-Hover": Se
|
|
1739
1738
|
}, void 0, !0)
|
|
1740
1739
|
], 64)) : z("", !0)
|
|
1741
1740
|
]),
|
|
@@ -1743,36 +1742,72 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1743
1742
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1744
1743
|
}
|
|
1745
1744
|
});
|
|
1746
|
-
const
|
|
1745
|
+
const we = /* @__PURE__ */ ee(da, [["__scopeId", "data-v-2d7c3049"]]), wt = 8, va = 8, ma = 20, We = 2, Et = 2, pa = ["dy", "dominant-baseline"], fa = ["y", "x", "width", "height"], ha = { class: "lume-alluvial-group__label-wrapper" }, ga = /* @__PURE__ */ Z({
|
|
1747
1746
|
__name: "lume-alluvial-node-label",
|
|
1748
1747
|
props: {
|
|
1749
|
-
bottom: { type: Boolean, default: !1 }
|
|
1748
|
+
bottom: { type: Boolean, default: !1 },
|
|
1749
|
+
left: { type: Boolean, default: !1 },
|
|
1750
|
+
maxWidth: { type: Number, default: 0 }
|
|
1750
1751
|
},
|
|
1751
|
-
|
|
1752
|
-
|
|
1752
|
+
emits: ["lume__internal--node-resize"],
|
|
1753
|
+
setup(e, { emit: n }) {
|
|
1754
|
+
const t = e, o = n, a = R(null), u = R(t.maxWidth), l = R(1);
|
|
1755
|
+
return Y(
|
|
1756
|
+
[a, () => t.maxWidth],
|
|
1757
|
+
async ([i, s]) => {
|
|
1758
|
+
if (i && s) {
|
|
1759
|
+
u.value = s, await gt();
|
|
1760
|
+
const { width: c, height: p } = i.getBoundingClientRect();
|
|
1761
|
+
u.value = c + Et > s ? s : c + Et, l.value = Math.ceil(p);
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
{ immediate: !0 }
|
|
1765
|
+
), Y(u, async (i) => {
|
|
1766
|
+
i !== t.maxWidth && (await gt(), o("lume__internal--node-resize"));
|
|
1767
|
+
}), (i, s) => e.maxWidth ? (_(), x("foreignObject", {
|
|
1768
|
+
key: 1,
|
|
1769
|
+
class: "lume-alluvial-group__node-foreign",
|
|
1770
|
+
y: e.bottom ? "0.1em" : -l.value + 1,
|
|
1771
|
+
x: e.left ? -u.value : 0,
|
|
1772
|
+
width: u.value,
|
|
1773
|
+
height: l.value
|
|
1774
|
+
}, [
|
|
1775
|
+
G("div", ha, [
|
|
1776
|
+
G("span", {
|
|
1777
|
+
ref_key: "text",
|
|
1778
|
+
ref: a,
|
|
1779
|
+
class: "lume-alluvial-group__node-label"
|
|
1780
|
+
}, [
|
|
1781
|
+
C(i.$slots, "default", {}, void 0, !0)
|
|
1782
|
+
], 512)
|
|
1783
|
+
])
|
|
1784
|
+
], 8, fa)) : (_(), x("text", {
|
|
1785
|
+
key: 0,
|
|
1753
1786
|
class: "lume-alluvial-group__node-label",
|
|
1754
|
-
dy: e.bottom ? "
|
|
1787
|
+
dy: e.bottom ? ".2em" : "-.2em",
|
|
1788
|
+
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1755
1789
|
}, [
|
|
1756
|
-
|
|
1757
|
-
], 8,
|
|
1790
|
+
C(i.$slots, "default", {}, void 0, !0)
|
|
1791
|
+
], 8, pa));
|
|
1758
1792
|
}
|
|
1759
1793
|
});
|
|
1760
|
-
const
|
|
1794
|
+
const _a = /* @__PURE__ */ ee(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y", "dominant-baseline"], ka = /* @__PURE__ */ Z({
|
|
1761
1795
|
__name: "lume-alluvial-node-value",
|
|
1762
1796
|
props: {
|
|
1763
1797
|
bottom: { type: Boolean, default: !0 }
|
|
1764
1798
|
},
|
|
1765
1799
|
setup(e) {
|
|
1766
|
-
return (n, t) => (
|
|
1800
|
+
return (n, t) => (_(), x("text", {
|
|
1767
1801
|
class: "lume-alluvial-group__node-value",
|
|
1768
|
-
|
|
1802
|
+
y: e.bottom ? ".2em" : "-.2em",
|
|
1803
|
+
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1769
1804
|
}, [
|
|
1770
|
-
|
|
1771
|
-
], 8,
|
|
1805
|
+
C(n.$slots, "default", {}, void 0, !0)
|
|
1806
|
+
], 8, ya));
|
|
1772
1807
|
}
|
|
1773
1808
|
});
|
|
1774
|
-
const
|
|
1775
|
-
function
|
|
1809
|
+
const ba = /* @__PURE__ */ ee(ka, [["__scopeId", "data-v-b4fc758b"]]);
|
|
1810
|
+
function Nt(e, n) {
|
|
1776
1811
|
return {
|
|
1777
1812
|
x0: 0 + (n ? n.left : 0),
|
|
1778
1813
|
y0: 0 + (n ? n.top : 0),
|
|
@@ -1780,87 +1815,87 @@ function $t(e, n) {
|
|
|
1780
1815
|
y1: e.height - (n ? n.bottom : 0)
|
|
1781
1816
|
};
|
|
1782
1817
|
}
|
|
1783
|
-
function
|
|
1784
|
-
const n = R(
|
|
1818
|
+
function Aa(e) {
|
|
1819
|
+
const n = R(Nt(e));
|
|
1785
1820
|
function t(o) {
|
|
1786
|
-
n.value =
|
|
1821
|
+
n.value = Nt(e, o);
|
|
1787
1822
|
}
|
|
1788
1823
|
return { extents: n, updateExtents: t };
|
|
1789
1824
|
}
|
|
1790
|
-
var
|
|
1791
|
-
const
|
|
1792
|
-
function
|
|
1793
|
-
t &&
|
|
1825
|
+
var Qt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Qt || {});
|
|
1826
|
+
const Ta = "[lume] ";
|
|
1827
|
+
function La(e, n, t = !0) {
|
|
1828
|
+
t && Ct() || console.error(Ta + "Error: " + e, n);
|
|
1794
1829
|
}
|
|
1795
|
-
const
|
|
1796
|
-
function
|
|
1830
|
+
const Oa = 200;
|
|
1831
|
+
function $e(e) {
|
|
1797
1832
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1798
1833
|
}
|
|
1799
|
-
function
|
|
1834
|
+
function xa(e, n) {
|
|
1800
1835
|
return n.nodes.find((t) => t.id === e);
|
|
1801
1836
|
}
|
|
1802
|
-
function
|
|
1837
|
+
function $a(e, n) {
|
|
1803
1838
|
return n.links.find((t) => t.id === e);
|
|
1804
1839
|
}
|
|
1805
|
-
function
|
|
1840
|
+
function qt(e) {
|
|
1806
1841
|
return !!(e.sourceLinks && e.targetLinks);
|
|
1807
1842
|
}
|
|
1808
|
-
function
|
|
1843
|
+
function Ia(e, n) {
|
|
1809
1844
|
if (!n)
|
|
1810
1845
|
return;
|
|
1811
1846
|
const t = e.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), o = e.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = n.filter((l) => t.includes(l.dataset.id)).reduce(
|
|
1812
1847
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1813
1848
|
-1 / 0
|
|
1814
|
-
),
|
|
1849
|
+
), u = n.filter((l) => o.includes(l.dataset.id)).reduce(
|
|
1815
1850
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1816
1851
|
-1 / 0
|
|
1817
1852
|
);
|
|
1818
1853
|
return {
|
|
1819
1854
|
left: a,
|
|
1820
1855
|
top: 0,
|
|
1821
|
-
right:
|
|
1856
|
+
right: u,
|
|
1822
1857
|
bottom: 0
|
|
1823
1858
|
};
|
|
1824
1859
|
}
|
|
1825
|
-
function
|
|
1860
|
+
function wa(e) {
|
|
1826
1861
|
return e.map((n) => {
|
|
1827
|
-
const t = n.y1 - n.y0 <
|
|
1862
|
+
const t = n.y1 - n.y0 < We;
|
|
1828
1863
|
return {
|
|
1829
1864
|
x: n.x0,
|
|
1830
|
-
y: n.y0 - (t ?
|
|
1865
|
+
y: n.y0 - (t ? We / 2 : 0),
|
|
1831
1866
|
// Negative offset to account for the min. height
|
|
1832
1867
|
width: n.x1 - n.x0,
|
|
1833
|
-
height: t ?
|
|
1868
|
+
height: t ? We : n.y1 - n.y0,
|
|
1834
1869
|
textTransform: {
|
|
1835
|
-
x: n.depth > 0 ? n.x1 +
|
|
1870
|
+
x: n.depth > 0 ? n.x1 + wt : n.x0 - wt,
|
|
1836
1871
|
y: (n.y1 + n.y0) / 2
|
|
1837
1872
|
},
|
|
1838
1873
|
node: n
|
|
1839
1874
|
};
|
|
1840
1875
|
});
|
|
1841
1876
|
}
|
|
1842
|
-
function
|
|
1877
|
+
function Ea(e) {
|
|
1843
1878
|
return [e.source.x1, e.y0];
|
|
1844
1879
|
}
|
|
1845
|
-
function
|
|
1880
|
+
function Na(e) {
|
|
1846
1881
|
return [e.target.x0, e.y1];
|
|
1847
1882
|
}
|
|
1848
|
-
function
|
|
1849
|
-
return e.curveFunction ?
|
|
1883
|
+
function Da(e) {
|
|
1884
|
+
return e.curveFunction ? fn(e.curveFunction).source(Ea).target(Na) : yn();
|
|
1850
1885
|
}
|
|
1851
|
-
function
|
|
1886
|
+
function Ha(e) {
|
|
1852
1887
|
return e.map((n) => {
|
|
1853
1888
|
var t;
|
|
1854
1889
|
return {
|
|
1855
1890
|
id: n.id,
|
|
1856
1891
|
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Be,
|
|
1857
|
-
d:
|
|
1892
|
+
d: Da(n)(n),
|
|
1858
1893
|
strokeWidth: Math.max(1, n.width),
|
|
1859
1894
|
link: n
|
|
1860
1895
|
};
|
|
1861
1896
|
});
|
|
1862
1897
|
}
|
|
1863
|
-
function
|
|
1898
|
+
function Dt(e, n, t, o, a) {
|
|
1864
1899
|
if (o === !1) {
|
|
1865
1900
|
e.node = {
|
|
1866
1901
|
...e.node,
|
|
@@ -1868,8 +1903,8 @@ function wt(e, n, t, o, a) {
|
|
|
1868
1903
|
};
|
|
1869
1904
|
return;
|
|
1870
1905
|
}
|
|
1871
|
-
const
|
|
1872
|
-
let c = (Date.now() -
|
|
1906
|
+
const u = Date.now(), l = Nn(n, t), i = () => {
|
|
1907
|
+
let c = (Date.now() - u) / Oa;
|
|
1873
1908
|
c > 1 && (c = 1), e.node = {
|
|
1874
1909
|
...e.node,
|
|
1875
1910
|
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
@@ -1877,17 +1912,17 @@ function wt(e, n, t, o, a) {
|
|
|
1877
1912
|
};
|
|
1878
1913
|
requestAnimationFrame(i);
|
|
1879
1914
|
}
|
|
1880
|
-
const
|
|
1915
|
+
const Ma = {
|
|
1881
1916
|
nodes: [],
|
|
1882
1917
|
links: []
|
|
1883
1918
|
};
|
|
1884
|
-
function
|
|
1919
|
+
function Ht(e, n) {
|
|
1885
1920
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1886
1921
|
}
|
|
1887
|
-
function
|
|
1922
|
+
function Ba(e, n, t) {
|
|
1888
1923
|
const o = R(null), a = v(() => {
|
|
1889
|
-
var
|
|
1890
|
-
return (
|
|
1924
|
+
var r;
|
|
1925
|
+
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1891
1926
|
({ label: f, color: g, value: m, deriveColorFromIncomingLinks: T, offset: O }) => ({
|
|
1892
1927
|
label: f || m.toString(),
|
|
1893
1928
|
color: g,
|
|
@@ -1897,10 +1932,10 @@ function Na(e, n, t) {
|
|
|
1897
1932
|
offset: O
|
|
1898
1933
|
})
|
|
1899
1934
|
);
|
|
1900
|
-
}),
|
|
1935
|
+
}), u = v(
|
|
1901
1936
|
() => {
|
|
1902
|
-
var
|
|
1903
|
-
return (
|
|
1937
|
+
var r;
|
|
1938
|
+
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1904
1939
|
(f) => {
|
|
1905
1940
|
var g;
|
|
1906
1941
|
return (g = f.targets) == null ? void 0 : g.map(
|
|
@@ -1916,43 +1951,43 @@ function Na(e, n, t) {
|
|
|
1916
1951
|
}
|
|
1917
1952
|
).filter(Boolean).flat();
|
|
1918
1953
|
}
|
|
1919
|
-
), l = v(() =>
|
|
1920
|
-
var
|
|
1921
|
-
return (
|
|
1954
|
+
), l = v(() => kn().nodeId($e).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1955
|
+
var r;
|
|
1956
|
+
return (r = o.value) == null ? void 0 : r.nodes.reduce(
|
|
1922
1957
|
(f, g) => {
|
|
1923
|
-
const m =
|
|
1958
|
+
const m = Ht(g, f);
|
|
1924
1959
|
return m ? (m.push(g), m.sort((T, O) => (T._y0 || T.y0) - (O._y0 || O.y0))) : f.push([g]), f;
|
|
1925
1960
|
},
|
|
1926
1961
|
[]
|
|
1927
1962
|
);
|
|
1928
1963
|
});
|
|
1929
|
-
function s(
|
|
1930
|
-
const { offset: f } =
|
|
1964
|
+
function s(r) {
|
|
1965
|
+
const { offset: f } = r, g = Ht(r, i.value);
|
|
1931
1966
|
if (!g)
|
|
1932
1967
|
return;
|
|
1933
|
-
const m = g[g.findIndex((O) => O.id ===
|
|
1934
|
-
|
|
1968
|
+
const m = g[g.findIndex((O) => O.id === r.id) - 1], T = m && g.length !== 1 ? m.y1 + f : f;
|
|
1969
|
+
r._y0 = r.y0, r._y1 = r.y1, r.y0 = T, r.y1 = r.y0 + (r._y1 - r._y0);
|
|
1935
1970
|
}
|
|
1936
|
-
function c(
|
|
1937
|
-
const { id: g, _y0: m, y0: T } =
|
|
1938
|
-
(
|
|
1971
|
+
function c(r, f) {
|
|
1972
|
+
const { id: g, _y0: m, y0: T } = r, O = f.links.filter(
|
|
1973
|
+
($) => $.source.id === g
|
|
1939
1974
|
), b = f.links.filter(
|
|
1940
|
-
(
|
|
1975
|
+
($) => $.target.id === g
|
|
1941
1976
|
), h = T - m;
|
|
1942
|
-
O.forEach((
|
|
1977
|
+
O.forEach(($) => $.y0 += h), b.forEach(($) => $.y1 += h);
|
|
1943
1978
|
}
|
|
1944
|
-
const p = v(() => (o.value && a.value.forEach((
|
|
1945
|
-
|
|
1979
|
+
const p = v(() => (o.value && a.value.forEach((r) => {
|
|
1980
|
+
r.value === 0 && (r.fallbackColor = at.Grey), typeof r.offset == "number" && (s(r), c(r, o.value));
|
|
1946
1981
|
}), o.value));
|
|
1947
|
-
return
|
|
1982
|
+
return Y([l, t], () => {
|
|
1948
1983
|
try {
|
|
1949
|
-
const { x0:
|
|
1984
|
+
const { x0: r, y0: f, x1: g, y1: m } = t.value;
|
|
1950
1985
|
o.value = l.value.extent([
|
|
1951
|
-
[
|
|
1986
|
+
[r, f],
|
|
1952
1987
|
[g, m]
|
|
1953
|
-
])({ nodes: a.value, links:
|
|
1954
|
-
} catch (
|
|
1955
|
-
|
|
1988
|
+
])({ nodes: a.value, links: u.value });
|
|
1989
|
+
} catch (r) {
|
|
1990
|
+
La(Qt.GraphProblem, r), o.value = Ma;
|
|
1956
1991
|
}
|
|
1957
1992
|
}), { columns: i, graph: p };
|
|
1958
1993
|
}
|
|
@@ -1972,12 +2007,12 @@ function tt(e, n) {
|
|
|
1972
2007
|
);
|
|
1973
2008
|
}), n;
|
|
1974
2009
|
}
|
|
1975
|
-
function
|
|
2010
|
+
function Ra(e, n) {
|
|
1976
2011
|
return n.links.reduce((t, o) => (o.source.id in e && o.target.id in e && t.push(o.id), t), []);
|
|
1977
2012
|
}
|
|
1978
|
-
const
|
|
2013
|
+
const Sa = (e, n) => {
|
|
1979
2014
|
let t;
|
|
1980
|
-
|
|
2015
|
+
qt(e) ? t = {
|
|
1981
2016
|
[e.id]: e.value,
|
|
1982
2017
|
...et(e),
|
|
1983
2018
|
...tt(e)
|
|
@@ -1987,36 +2022,36 @@ const Ha = (e, n) => {
|
|
|
1987
2022
|
...et(e.source),
|
|
1988
2023
|
...tt(e.target)
|
|
1989
2024
|
};
|
|
1990
|
-
const o =
|
|
2025
|
+
const o = Ra(t, n);
|
|
1991
2026
|
return { nodes: t, links: o };
|
|
1992
|
-
},
|
|
1993
|
-
if (
|
|
2027
|
+
}, Ca = (e) => {
|
|
2028
|
+
if (qt(e)) {
|
|
1994
2029
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
1995
2030
|
return {
|
|
1996
2031
|
nodes: n.reduce(
|
|
1997
|
-
(t, { source: o, target: a, value:
|
|
1998
|
-
{ [
|
|
2032
|
+
(t, { source: o, target: a, value: u }) => o === e ? { ...t, [$e(a)]: u } : { ...t, [$e(o)]: u },
|
|
2033
|
+
{ [$e(e)]: e.value }
|
|
1999
2034
|
),
|
|
2000
2035
|
links: n.map(({ id: t }) => t)
|
|
2001
2036
|
};
|
|
2002
2037
|
}
|
|
2003
2038
|
return {
|
|
2004
2039
|
nodes: {
|
|
2005
|
-
[
|
|
2006
|
-
[
|
|
2040
|
+
[$e(e.target)]: e.value,
|
|
2041
|
+
[$e(e.source)]: e.source.value
|
|
2007
2042
|
},
|
|
2008
2043
|
links: [e.id]
|
|
2009
2044
|
};
|
|
2010
2045
|
};
|
|
2011
|
-
function
|
|
2046
|
+
function Ga(e, n, t) {
|
|
2012
2047
|
const o = R(null), a = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2013
2048
|
o.value,
|
|
2014
2049
|
t.value
|
|
2015
|
-
) : n.value.highlightedElements === "closest" ?
|
|
2016
|
-
return
|
|
2017
|
-
if (
|
|
2050
|
+
) : n.value.highlightedElements === "closest" ? Ca(o.value, t.value) : Sa(o.value, t.value) : { nodes: {}, links: [] });
|
|
2051
|
+
return Y(a, (u, l) => {
|
|
2052
|
+
if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
|
|
2018
2053
|
e.value.forEach((i) => {
|
|
2019
|
-
i.node.id in l.nodes &&
|
|
2054
|
+
i.node.id in l.nodes && Dt(
|
|
2020
2055
|
i,
|
|
2021
2056
|
l.nodes[i.node.id],
|
|
2022
2057
|
i.node.value,
|
|
@@ -2027,22 +2062,22 @@ function Ma(e, n, t) {
|
|
|
2027
2062
|
return;
|
|
2028
2063
|
}
|
|
2029
2064
|
e.value.forEach((i) => {
|
|
2030
|
-
i.node.id in
|
|
2065
|
+
i.node.id in u.nodes && Dt(
|
|
2031
2066
|
i,
|
|
2032
2067
|
i.node.value,
|
|
2033
|
-
|
|
2068
|
+
u.nodes[i.node.id],
|
|
2034
2069
|
n.value.withTransition
|
|
2035
2070
|
);
|
|
2036
2071
|
});
|
|
2037
2072
|
}), { highlightedElements: a, hoveredElement: o };
|
|
2038
2073
|
}
|
|
2039
|
-
const
|
|
2074
|
+
const ja = {
|
|
2040
2075
|
class: "lume-alluvial-group",
|
|
2041
2076
|
"data-j-alluvial-group": ""
|
|
2042
|
-
},
|
|
2077
|
+
}, Va = { key: 0 }, Pa = ["x", "y"], Fa = { key: 0 }, za = ["id", "x1", "x2"], Wa = ["stop-color"], Za = ["stop-color"], Ua = ["d", "stroke-width", "onClick", "onMouseover"], Xa = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ya = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Ka = ["x", "y", "height", "width"], Ja = ["transform", "data-id", "width"], Qa = /* @__PURE__ */ Z({
|
|
2043
2078
|
__name: "lume-alluvial-group",
|
|
2044
2079
|
props: {
|
|
2045
|
-
...
|
|
2080
|
+
...Ve(),
|
|
2046
2081
|
hoveredElementId: {
|
|
2047
2082
|
type: [Number, String],
|
|
2048
2083
|
default: null
|
|
@@ -2050,236 +2085,241 @@ const Ra = {
|
|
|
2050
2085
|
},
|
|
2051
2086
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2052
2087
|
setup(e, { emit: n }) {
|
|
2053
|
-
const t = e, o = n, a =
|
|
2088
|
+
const t = e, o = n, a = De("chartID"), { data: u, options: l } = te(t), i = R([]), s = R([]), c = R(null), { extents: p, updateExtents: r } = Aa(t.containerSize), { columns: f, graph: g } = Ba(u, l, p), { hoveredElement: m, highlightedElements: T } = Ga(
|
|
2054
2089
|
i,
|
|
2055
2090
|
l,
|
|
2056
2091
|
g
|
|
2057
|
-
), O = v(() =>
|
|
2092
|
+
), O = v(() => Ce(l.value.valueFormat)), b = v(
|
|
2058
2093
|
() => Object.keys(T.value.nodes)
|
|
2059
2094
|
), h = v(() => f.value ? f.value.map(
|
|
2060
2095
|
(k) => k[0].x0 + l.value.nodeWidth / 2
|
|
2061
|
-
) : []),
|
|
2096
|
+
) : []), $ = v(() => {
|
|
2062
2097
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2063
|
-
return l.value.nodeHeaders.slice(0, h.value.length).map((k,
|
|
2098
|
+
return l.value.nodeHeaders.slice(0, h.value.length).map((k, B) => ({
|
|
2064
2099
|
label: k,
|
|
2065
|
-
x: h.value[
|
|
2100
|
+
x: h.value[B]
|
|
2066
2101
|
}));
|
|
2067
2102
|
}), w = v(
|
|
2068
|
-
() => l.value.nodeHeaderPadding ??
|
|
2069
|
-
),
|
|
2103
|
+
() => l.value.nodeHeaderPadding ?? ma
|
|
2104
|
+
), N = v(() => {
|
|
2070
2105
|
if (!(!l.value.gradient || !g.value))
|
|
2071
|
-
return g.value.links.reduce((k,
|
|
2072
|
-
const { source:
|
|
2073
|
-
return k[
|
|
2074
|
-
source:
|
|
2075
|
-
target:
|
|
2076
|
-
x1:
|
|
2077
|
-
x2:
|
|
2106
|
+
return g.value.links.reduce((k, B) => {
|
|
2107
|
+
const { source: y, target: X } = B, J = y.color || y.fallbackColor, se = X.deriveColorFromIncomingLinks ? J : X.color || X.fallbackColor;
|
|
2108
|
+
return k[B.id] = {
|
|
2109
|
+
source: J,
|
|
2110
|
+
target: se,
|
|
2111
|
+
x1: y.x1,
|
|
2112
|
+
x2: X.x0
|
|
2078
2113
|
}, k;
|
|
2079
2114
|
}, {});
|
|
2080
|
-
}),
|
|
2115
|
+
}), E = v(() => {
|
|
2081
2116
|
const k = i.value.filter(
|
|
2082
|
-
(
|
|
2083
|
-
),
|
|
2084
|
-
return k.forEach((
|
|
2085
|
-
const
|
|
2086
|
-
s.value.filter(({ link:
|
|
2087
|
-
const
|
|
2088
|
-
return
|
|
2089
|
-
x:
|
|
2090
|
-
y:
|
|
2091
|
-
height:
|
|
2092
|
-
width:
|
|
2093
|
-
key: `node-block-${
|
|
2094
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2095
|
-
}),
|
|
2096
|
-
}, 0),
|
|
2097
|
-
id:
|
|
2098
|
-
subNodes:
|
|
2117
|
+
(y) => Q(y)
|
|
2118
|
+
), B = [];
|
|
2119
|
+
return k.forEach((y) => {
|
|
2120
|
+
const X = [];
|
|
2121
|
+
s.value.filter(({ link: J }) => J.target.id === y.node.id).reverse().reduce((J, se) => {
|
|
2122
|
+
const be = se.link.target.y1 - se.link.target.y0, Re = se.link.value / y.node.value * be;
|
|
2123
|
+
return X.push({
|
|
2124
|
+
x: y.x,
|
|
2125
|
+
y: y.y + J,
|
|
2126
|
+
height: Re,
|
|
2127
|
+
width: y.width,
|
|
2128
|
+
key: `node-block-${y.node.id}-source-link-${se.link.source.id}`,
|
|
2129
|
+
class: `lume-alluvial-group__node-block lume-fill--${se.link.source.color || Be}`
|
|
2130
|
+
}), J + Re;
|
|
2131
|
+
}, 0), B.push({
|
|
2132
|
+
id: y.node.id,
|
|
2133
|
+
subNodes: X
|
|
2099
2134
|
});
|
|
2100
|
-
}),
|
|
2135
|
+
}), B;
|
|
2101
2136
|
});
|
|
2102
|
-
function
|
|
2137
|
+
function D(k) {
|
|
2103
2138
|
return l.value.gradient && `url('#${a}_${k.id}')`;
|
|
2104
2139
|
}
|
|
2105
|
-
function
|
|
2140
|
+
function V(k) {
|
|
2106
2141
|
return b.value.length > 0 && !b.value.includes(k.toString());
|
|
2107
2142
|
}
|
|
2108
2143
|
function U(k) {
|
|
2109
2144
|
return b.value.length > 0 && b.value.includes(k.toString());
|
|
2110
2145
|
}
|
|
2111
|
-
function
|
|
2146
|
+
function ne(k) {
|
|
2112
2147
|
return T.value.links.length > 0 && !T.value.links.includes(k);
|
|
2113
2148
|
}
|
|
2114
2149
|
function F(k) {
|
|
2115
2150
|
return T.value.links.length > 0 && T.value.links.includes(k);
|
|
2116
2151
|
}
|
|
2117
|
-
function
|
|
2152
|
+
function Q(k) {
|
|
2118
2153
|
return !k.node.color && k.node.deriveColorFromIncomingLinks;
|
|
2119
2154
|
}
|
|
2120
|
-
function
|
|
2121
|
-
k !== m.value && (m.value = k, o("link-mouseenter", { link: k, event:
|
|
2155
|
+
function Oe(k, B) {
|
|
2156
|
+
k !== m.value && (m.value = k, o("link-mouseenter", { link: k, event: B }));
|
|
2122
2157
|
}
|
|
2123
|
-
function
|
|
2124
|
-
const
|
|
2125
|
-
m.value = null, o("link-mouseleave", { link:
|
|
2158
|
+
function xe(k) {
|
|
2159
|
+
const B = m.value;
|
|
2160
|
+
m.value = null, o("link-mouseleave", { link: B, event: k });
|
|
2126
2161
|
}
|
|
2127
|
-
function
|
|
2162
|
+
function ke(k) {
|
|
2128
2163
|
if (k == null) {
|
|
2129
2164
|
m.value = null;
|
|
2130
2165
|
return;
|
|
2131
2166
|
}
|
|
2132
|
-
const
|
|
2133
|
-
if (!
|
|
2134
|
-
|
|
2167
|
+
const B = xa(k, g.value) || $a(k, g.value);
|
|
2168
|
+
if (!B) {
|
|
2169
|
+
ge(ve.InvalidHoveredElement);
|
|
2135
2170
|
return;
|
|
2136
2171
|
}
|
|
2137
|
-
m.value =
|
|
2172
|
+
m.value = B;
|
|
2138
2173
|
}
|
|
2139
|
-
function
|
|
2140
|
-
var
|
|
2141
|
-
return ((
|
|
2174
|
+
function S(k) {
|
|
2175
|
+
var B;
|
|
2176
|
+
return ((B = E.value.find(({ id: y }) => k === y)) == null ? void 0 : B.subNodes) ?? [];
|
|
2142
2177
|
}
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2178
|
+
function M() {
|
|
2179
|
+
const k = Ia(g.value, c.value);
|
|
2180
|
+
r(k);
|
|
2181
|
+
}
|
|
2182
|
+
return Y(g, (k) => {
|
|
2183
|
+
i.value = wa(k.nodes), s.value = Ha(k.links).reverse(), m.value == null && t.hoveredElementId != null && ke(t.hoveredElementId);
|
|
2184
|
+
}), Y([t.containerSize, c], () => {
|
|
2185
|
+
t.containerSize.width && t.containerSize.height && M();
|
|
2186
|
+
}), Y(() => t.hoveredElementId, ke), (k, B) => (_(), x("g", ja, [
|
|
2187
|
+
$.value ? (_(), x("g", Va, [
|
|
2188
|
+
(_(!0), x(q, null, W($.value, (y) => (_(), x("text", {
|
|
2189
|
+
key: `header_${y.x}`,
|
|
2190
|
+
x: y.x,
|
|
2155
2191
|
y: -w.value,
|
|
2156
2192
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
2157
|
-
},
|
|
2193
|
+
}, ae(y.label), 9, Pa))), 128))
|
|
2158
2194
|
])) : z("", !0),
|
|
2159
|
-
|
|
2195
|
+
G("g", {
|
|
2160
2196
|
class: "lume-alluvial-link-group",
|
|
2161
|
-
onMouseleave:
|
|
2197
|
+
onMouseleave: xe
|
|
2162
2198
|
}, [
|
|
2163
|
-
d(l).gradient ? (
|
|
2164
|
-
(
|
|
2165
|
-
id: `${d(a)}_${
|
|
2166
|
-
key:
|
|
2199
|
+
d(l).gradient ? (_(), x("defs", Fa, [
|
|
2200
|
+
(_(!0), x(q, null, W(N.value, (y, X) => (_(), x("linearGradient", {
|
|
2201
|
+
id: `${d(a)}_${X}`,
|
|
2202
|
+
key: X,
|
|
2167
2203
|
gradientUnits: "userSpaceOnUse",
|
|
2168
|
-
x1:
|
|
2169
|
-
x2:
|
|
2204
|
+
x1: y.x1,
|
|
2205
|
+
x2: y.x2
|
|
2170
2206
|
}, [
|
|
2171
|
-
|
|
2207
|
+
G("stop", {
|
|
2172
2208
|
offset: "0%",
|
|
2173
|
-
"stop-color": `var(--lume-color--${
|
|
2174
|
-
}, null, 8,
|
|
2175
|
-
|
|
2209
|
+
"stop-color": `var(--lume-color--${y.source})`
|
|
2210
|
+
}, null, 8, Wa),
|
|
2211
|
+
G("stop", {
|
|
2176
2212
|
offset: "100%",
|
|
2177
|
-
"stop-color": `var(--lume-color--${
|
|
2178
|
-
}, null, 8,
|
|
2179
|
-
], 8,
|
|
2213
|
+
"stop-color": `var(--lume-color--${y.target})`
|
|
2214
|
+
}, null, 8, Za)
|
|
2215
|
+
], 8, za))), 128))
|
|
2180
2216
|
])) : z("", !0),
|
|
2181
|
-
(
|
|
2182
|
-
key: `link-ghost_${
|
|
2183
|
-
class:
|
|
2217
|
+
(_(!0), x(q, null, W(s.value, (y) => (_(), x("path", {
|
|
2218
|
+
key: `link-ghost_${y.id}`,
|
|
2219
|
+
class: oe(["lume-alluvial-group__link", [
|
|
2184
2220
|
"lume-stroke--transparent",
|
|
2185
2221
|
"lume-alluvial-group__link--ghost"
|
|
2186
2222
|
]]),
|
|
2187
|
-
d:
|
|
2188
|
-
"stroke-width":
|
|
2223
|
+
d: y.d,
|
|
2224
|
+
"stroke-width": y.strokeWidth + d(va),
|
|
2189
2225
|
"data-j-alluvial-ghost": "",
|
|
2190
|
-
onClick: (
|
|
2191
|
-
onMouseover: (
|
|
2192
|
-
}, null, 40,
|
|
2193
|
-
(
|
|
2194
|
-
key: `link_${
|
|
2195
|
-
class:
|
|
2196
|
-
[`lume-stroke--${
|
|
2197
|
-
"lume-alluvial-group__link--faded":
|
|
2198
|
-
"lume-alluvial-group__link--focused": F(
|
|
2226
|
+
onClick: (X) => o("link-click", { link: y.link, event: X }),
|
|
2227
|
+
onMouseover: (X) => Oe(y.link, X)
|
|
2228
|
+
}, null, 40, Ua))), 128)),
|
|
2229
|
+
(_(!0), x(q, null, W(s.value, (y) => (_(), x("path", {
|
|
2230
|
+
key: `link_${y.id}`,
|
|
2231
|
+
class: oe(["lume-alluvial-group__link", {
|
|
2232
|
+
[`lume-stroke--${y.color}`]: !d(l).gradient && y.color,
|
|
2233
|
+
"lume-alluvial-group__link--faded": ne(y.id),
|
|
2234
|
+
"lume-alluvial-group__link--focused": F(y.id)
|
|
2199
2235
|
}]),
|
|
2200
|
-
d:
|
|
2201
|
-
stroke:
|
|
2236
|
+
d: y.d,
|
|
2237
|
+
stroke: D(y.link),
|
|
2202
2238
|
"stroke-dasharray": k.containerSize.width,
|
|
2203
2239
|
"stroke-dashoffset": k.containerSize.width,
|
|
2204
|
-
"stroke-width":
|
|
2240
|
+
"stroke-width": y.strokeWidth,
|
|
2205
2241
|
"data-j-alluvial-path": "",
|
|
2206
|
-
"data-id":
|
|
2207
|
-
onClick: (
|
|
2208
|
-
onMouseover: (
|
|
2209
|
-
}, null, 42,
|
|
2242
|
+
"data-id": y.id,
|
|
2243
|
+
onClick: (X) => o("link-click", { link: y.link, event: X }),
|
|
2244
|
+
onMouseover: (X) => Oe(y.link, X)
|
|
2245
|
+
}, null, 42, Xa))), 128))
|
|
2210
2246
|
], 32),
|
|
2211
|
-
(
|
|
2212
|
-
key: `node-block_${
|
|
2213
|
-
class:
|
|
2214
|
-
"lume-alluvial-group__node--faded":
|
|
2215
|
-
"lume-alluvial-group__node--focused": U(
|
|
2247
|
+
(_(!0), x(q, null, W(i.value, (y, X) => (_(), x("g", {
|
|
2248
|
+
key: `node-block_${X}`,
|
|
2249
|
+
class: oe(["lume-alluvial-group__node", {
|
|
2250
|
+
"lume-alluvial-group__node--faded": V(y.node.id),
|
|
2251
|
+
"lume-alluvial-group__node--focused": U(y.node.id)
|
|
2216
2252
|
}]),
|
|
2217
2253
|
"data-j-alluvial-group__node-block": ""
|
|
2218
2254
|
}, [
|
|
2219
|
-
|
|
2220
|
-
onClick: (
|
|
2221
|
-
onMouseenter: (
|
|
2222
|
-
onMouseleave: (
|
|
2223
|
-
onMouseover: (
|
|
2224
|
-
onMouseout:
|
|
2255
|
+
G("g", {
|
|
2256
|
+
onClick: (J) => o("node-click", { node: y.node, event: J }),
|
|
2257
|
+
onMouseenter: (J) => o("node-mouseenter", { node: y.node, event: J }),
|
|
2258
|
+
onMouseleave: (J) => o("node-mouseleave", { node: y.node, event: J }),
|
|
2259
|
+
onMouseover: (J) => m.value = y.node,
|
|
2260
|
+
onMouseout: B[0] || (B[0] = (J) => m.value = null)
|
|
2225
2261
|
}, [
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
), (
|
|
2229
|
-
key:
|
|
2262
|
+
Q(y) ? (_(!0), x(q, { key: 0 }, W(S(
|
|
2263
|
+
y.node.id
|
|
2264
|
+
), (J) => (_(), x("rect", j(J, {
|
|
2265
|
+
key: J.key,
|
|
2230
2266
|
"data-j-alluvial-sub-nodes": ""
|
|
2231
|
-
}), null, 16))), 128)) : (
|
|
2267
|
+
}), null, 16))), 128)) : (_(), x("rect", {
|
|
2232
2268
|
key: 1,
|
|
2233
|
-
class:
|
|
2234
|
-
x:
|
|
2235
|
-
y:
|
|
2236
|
-
height:
|
|
2237
|
-
width:
|
|
2238
|
-
}, null, 10,
|
|
2239
|
-
|
|
2269
|
+
class: oe(["lume-alluvial-group__node-block", `lume-fill--${y.node.color || y.node.fallbackColor}`]),
|
|
2270
|
+
x: y.x,
|
|
2271
|
+
y: y.y,
|
|
2272
|
+
height: y.height,
|
|
2273
|
+
width: y.width
|
|
2274
|
+
}, null, 10, Ka)),
|
|
2275
|
+
G("g", {
|
|
2240
2276
|
ref_for: !0,
|
|
2241
2277
|
ref_key: "nodeTextRefs",
|
|
2242
2278
|
ref: c,
|
|
2243
|
-
class:
|
|
2244
|
-
"lume-alluvial-group__node-text--left":
|
|
2279
|
+
class: oe(["lume-alluvial-group__node-text lume-typography--caption", {
|
|
2280
|
+
"lume-alluvial-group__node-text--left": y.node.depth === 0
|
|
2245
2281
|
}]),
|
|
2246
|
-
transform: `translate(${
|
|
2247
|
-
"data-id":
|
|
2282
|
+
transform: `translate(${y.textTransform.x},${y.textTransform.y})`,
|
|
2283
|
+
"data-id": y.node.id,
|
|
2284
|
+
width: d(l).nodeLabelMaxWidth
|
|
2248
2285
|
}, [
|
|
2249
|
-
|
|
2250
|
-
node:
|
|
2286
|
+
C(k.$slots, `node-text-${y.node.id}`, {
|
|
2287
|
+
node: y.node,
|
|
2251
2288
|
value: O.value(
|
|
2252
|
-
|
|
2253
|
-
|
|
2289
|
+
y.node.transitionValue || y.node.value,
|
|
2290
|
+
y.node.value
|
|
2254
2291
|
)
|
|
2255
2292
|
}, () => [
|
|
2256
|
-
re(d(
|
|
2257
|
-
bottom: d(l).switchText
|
|
2293
|
+
re(d(_a), {
|
|
2294
|
+
bottom: d(l).switchText,
|
|
2295
|
+
left: y.node.depth === 0,
|
|
2296
|
+
"max-width": d(l).nodeLabelMaxWidth,
|
|
2297
|
+
"onLume__internal-NodeResize": M
|
|
2258
2298
|
}, {
|
|
2259
2299
|
default: P(() => [
|
|
2260
|
-
|
|
2300
|
+
pe(ae(y.node.label), 1)
|
|
2261
2301
|
]),
|
|
2262
2302
|
_: 2
|
|
2263
|
-
}, 1032, ["bottom"]),
|
|
2264
|
-
re(d(
|
|
2303
|
+
}, 1032, ["bottom", "left", "max-width"]),
|
|
2304
|
+
re(d(ba), {
|
|
2265
2305
|
bottom: !d(l).switchText
|
|
2266
2306
|
}, {
|
|
2267
2307
|
default: P(() => [
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2308
|
+
pe(ae(O.value(
|
|
2309
|
+
y.node.transitionValue || y.node.value,
|
|
2310
|
+
y.node.value
|
|
2271
2311
|
)), 1)
|
|
2272
2312
|
]),
|
|
2273
2313
|
_: 2
|
|
2274
2314
|
}, 1032, ["bottom"])
|
|
2275
2315
|
], !0)
|
|
2276
|
-
], 10,
|
|
2277
|
-
], 40,
|
|
2316
|
+
], 10, Ja)
|
|
2317
|
+
], 40, Ya)
|
|
2278
2318
|
], 2))), 128))
|
|
2279
2319
|
]));
|
|
2280
2320
|
}
|
|
2281
2321
|
});
|
|
2282
|
-
const
|
|
2322
|
+
const qa = /* @__PURE__ */ ee(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
2283
2323
|
margins: {
|
|
2284
2324
|
top: 0,
|
|
2285
2325
|
right: 0,
|
|
@@ -2295,16 +2335,16 @@ const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
|
2295
2335
|
highlightedElements: "closest",
|
|
2296
2336
|
nodePadding: 16,
|
|
2297
2337
|
nodeWidth: 16,
|
|
2298
|
-
nodeAlign:
|
|
2338
|
+
nodeAlign: bn,
|
|
2299
2339
|
valueFormat: (e) => String(e),
|
|
2300
2340
|
iterations: 6
|
|
2301
|
-
},
|
|
2341
|
+
}, Vl = /* @__PURE__ */ Z({
|
|
2302
2342
|
__name: "lume-alluvial-diagram",
|
|
2303
2343
|
props: {
|
|
2304
|
-
...
|
|
2344
|
+
...Fo(nt)
|
|
2305
2345
|
},
|
|
2306
2346
|
setup(e, { emit: n }) {
|
|
2307
|
-
const t = e, { componentEventPropagator: o } =
|
|
2347
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Le(ue()), u = Hn(ue()), { options: l } = te(t), { allOptions: i } = me(l, el);
|
|
2308
2348
|
function s(c) {
|
|
2309
2349
|
return {
|
|
2310
2350
|
...c,
|
|
@@ -2312,40 +2352,40 @@ const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
|
2312
2352
|
// Alluvial chart never uses base scales
|
|
2313
2353
|
};
|
|
2314
2354
|
}
|
|
2315
|
-
return (c, p) => (
|
|
2355
|
+
return (c, p) => (_(), K(d(we), j(t, {
|
|
2316
2356
|
options: s(d(i)),
|
|
2317
2357
|
"data-j-alluvial-diagram": ""
|
|
2318
|
-
},
|
|
2319
|
-
groups: P((
|
|
2320
|
-
re(d(
|
|
2321
|
-
|
|
2358
|
+
}, le(d(o))), ce({
|
|
2359
|
+
groups: P((r) => [
|
|
2360
|
+
re(d(qa), j(r, { "hovered-element-id": c.hoveredElement }, le(d(o))), ce({ _: 2 }, [
|
|
2361
|
+
W(d(u), (f, g) => ({
|
|
2322
2362
|
name: g,
|
|
2323
2363
|
fn: P((m) => [
|
|
2324
|
-
|
|
2364
|
+
C(c.$slots, g, fe(he(m || {})))
|
|
2325
2365
|
])
|
|
2326
2366
|
}))
|
|
2327
2367
|
]), 1040, ["hovered-element-id"])
|
|
2328
2368
|
]),
|
|
2329
2369
|
_: 2
|
|
2330
2370
|
}, [
|
|
2331
|
-
|
|
2371
|
+
W(d(a), (r, f) => ({
|
|
2332
2372
|
name: f,
|
|
2333
2373
|
fn: P((g) => [
|
|
2334
|
-
|
|
2374
|
+
C(c.$slots, f, fe(he(g || {})))
|
|
2335
2375
|
])
|
|
2336
2376
|
}))
|
|
2337
2377
|
]), 1040, ["options"]));
|
|
2338
2378
|
}
|
|
2339
2379
|
});
|
|
2340
|
-
var
|
|
2341
|
-
const
|
|
2380
|
+
var en = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(en || {});
|
|
2381
|
+
const Pl = /* @__PURE__ */ Z({
|
|
2342
2382
|
__name: "lume-bar-chart",
|
|
2343
2383
|
props: {
|
|
2344
|
-
|
|
2384
|
+
...Ie(),
|
|
2345
2385
|
type: {
|
|
2346
2386
|
type: String,
|
|
2347
2387
|
default: null,
|
|
2348
|
-
validator: (e) => e in
|
|
2388
|
+
validator: (e) => e in en || e == null
|
|
2349
2389
|
}
|
|
2350
2390
|
},
|
|
2351
2391
|
setup(e, { emit: n }) {
|
|
@@ -2355,64 +2395,64 @@ const Cl = /* @__PURE__ */ W({
|
|
|
2355
2395
|
() => import("./common/abc9d23d.js")
|
|
2356
2396
|
), a = ze(
|
|
2357
2397
|
() => import("./common/0664fd4d.js")
|
|
2358
|
-
),
|
|
2398
|
+
), u = /* @__PURE__ */ new Map([
|
|
2359
2399
|
["single", t],
|
|
2360
2400
|
["grouped", o],
|
|
2361
2401
|
["stacked", a]
|
|
2362
|
-
]), l = e, { componentEventPropagator: i } =
|
|
2363
|
-
function c(
|
|
2402
|
+
]), l = e, { componentEventPropagator: i } = ye(), s = Le(ue());
|
|
2403
|
+
function c(r) {
|
|
2364
2404
|
return {
|
|
2365
|
-
...
|
|
2405
|
+
...r,
|
|
2366
2406
|
startOnZero: !0,
|
|
2367
2407
|
// Bar chart always starts on zero,
|
|
2368
2408
|
tooltipOptions: {
|
|
2369
|
-
...(
|
|
2370
|
-
position: l.orientation ===
|
|
2409
|
+
...(r == null ? void 0 : r.tooltipOptions) || {},
|
|
2410
|
+
position: l.orientation === H.HORIZONTAL ? "right" : void 0
|
|
2371
2411
|
}
|
|
2372
2412
|
};
|
|
2373
2413
|
}
|
|
2374
2414
|
const p = v(() => {
|
|
2375
2415
|
if (l.data) {
|
|
2376
2416
|
if (nt(l.data))
|
|
2377
|
-
return
|
|
2417
|
+
return u.get("single");
|
|
2378
2418
|
if (!l.type)
|
|
2379
2419
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2380
|
-
return
|
|
2420
|
+
return u.get(l.type);
|
|
2381
2421
|
}
|
|
2382
2422
|
});
|
|
2383
|
-
return (
|
|
2384
|
-
options: c(
|
|
2385
|
-
},
|
|
2386
|
-
|
|
2423
|
+
return (r, f) => (_(), K(vn(p.value), j({ ...l, ...r.$attrs }, {
|
|
2424
|
+
options: c(r.options)
|
|
2425
|
+
}, le(d(i))), ce({ _: 2 }, [
|
|
2426
|
+
W(d(s), (g, m) => ({
|
|
2387
2427
|
name: m,
|
|
2388
2428
|
fn: P((T) => [
|
|
2389
|
-
|
|
2429
|
+
C(r.$slots, m, fe(he(T || {})))
|
|
2390
2430
|
])
|
|
2391
2431
|
}))
|
|
2392
2432
|
]), 1040, ["options"]));
|
|
2393
2433
|
}
|
|
2394
2434
|
});
|
|
2395
|
-
function
|
|
2396
|
-
return Object.values(
|
|
2435
|
+
function tl(e) {
|
|
2436
|
+
return Object.values(Cn).includes(e) || e == null;
|
|
2397
2437
|
}
|
|
2398
|
-
function
|
|
2399
|
-
return Object.values(
|
|
2438
|
+
function nl(e) {
|
|
2439
|
+
return Object.values(H).includes(e);
|
|
2400
2440
|
}
|
|
2401
|
-
const
|
|
2441
|
+
const ol = (e = !1) => ({
|
|
2402
2442
|
type: {
|
|
2403
2443
|
type: String,
|
|
2404
2444
|
default: null,
|
|
2405
|
-
validator:
|
|
2445
|
+
validator: tl
|
|
2406
2446
|
},
|
|
2407
2447
|
...e ? {
|
|
2408
2448
|
orientation: {
|
|
2409
2449
|
type: String,
|
|
2410
|
-
default:
|
|
2411
|
-
validator:
|
|
2450
|
+
default: H.VERTICAL,
|
|
2451
|
+
validator: nl
|
|
2412
2452
|
}
|
|
2413
2453
|
} : {}
|
|
2414
2454
|
});
|
|
2415
|
-
function
|
|
2455
|
+
function tn(e) {
|
|
2416
2456
|
const n = v(() => e.value.map((o) => ({
|
|
2417
2457
|
...o,
|
|
2418
2458
|
values: o.values.map((a) => ({
|
|
@@ -2421,46 +2461,46 @@ function Qt(e) {
|
|
|
2421
2461
|
}))
|
|
2422
2462
|
}))), t = v(() => {
|
|
2423
2463
|
var o;
|
|
2424
|
-
return (o = n.value) == null ? void 0 : o.reduce((a,
|
|
2464
|
+
return (o = n.value) == null ? void 0 : o.reduce((a, u) => (u.values.forEach((l, i) => {
|
|
2425
2465
|
a[i] ? a[i].push(l) : a[i] = [l];
|
|
2426
2466
|
}), a), []);
|
|
2427
2467
|
});
|
|
2428
2468
|
return { multiBarData: n, groupedData: t };
|
|
2429
2469
|
}
|
|
2430
|
-
function
|
|
2470
|
+
function al(e, n) {
|
|
2431
2471
|
return e.value.length === 1 ? "single" : n.value;
|
|
2432
2472
|
}
|
|
2433
|
-
function
|
|
2473
|
+
function ll(e, n, t) {
|
|
2434
2474
|
const o = v(
|
|
2435
|
-
() => t.value ===
|
|
2475
|
+
() => t.value === H.HORIZONTAL
|
|
2436
2476
|
);
|
|
2437
2477
|
function a(i) {
|
|
2438
2478
|
Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
|
|
2439
2479
|
}
|
|
2440
|
-
const
|
|
2441
|
-
return { barXScale:
|
|
2480
|
+
const u = v(() => o.value ? (() => (a(e.value), e.value))() : e.value), l = v(() => o.value ? n.value : (() => (a(n.value), n.value))());
|
|
2481
|
+
return { barXScale: u, barYScale: l };
|
|
2442
2482
|
}
|
|
2443
|
-
function
|
|
2483
|
+
function ul(e, n, t, o, a, u) {
|
|
2444
2484
|
const l = v(
|
|
2445
|
-
() => o.value ===
|
|
2485
|
+
() => o.value === H.HORIZONTAL
|
|
2446
2486
|
);
|
|
2447
|
-
function i(
|
|
2487
|
+
function i(r, f) {
|
|
2448
2488
|
let g, m;
|
|
2449
|
-
return l.value ? (g =
|
|
2489
|
+
return l.value ? (g = r >= 0 ? n.value(0) : n.value(r), m = t.value(t.value.domain()[f])) : (g = n.value(n.value.domain()[f]), m = r < 0 ? t.value(0) : t.value(r)), { x: g, y: m };
|
|
2450
2490
|
}
|
|
2451
|
-
function s(
|
|
2452
|
-
return l.value ?
|
|
2491
|
+
function s(r) {
|
|
2492
|
+
return l.value ? r < 0 ? n.value(0) - n.value(r) : n.value(r) - n.value(0) : n.value.bandwidth();
|
|
2453
2493
|
}
|
|
2454
|
-
function c(
|
|
2455
|
-
return l.value ? t.value.bandwidth() :
|
|
2494
|
+
function c(r) {
|
|
2495
|
+
return l.value ? t.value.bandwidth() : r < 0 ? t.value(r) - t.value(0) : t.value(0) - t.value(r);
|
|
2456
2496
|
}
|
|
2457
|
-
function p(
|
|
2458
|
-
const { value: m, color: T } =
|
|
2497
|
+
function p(r, f, g) {
|
|
2498
|
+
const { value: m, color: T } = r, O = T ?? e.value[f].color ?? Be, { x: b, y: h } = i(m, g), $ = s(m), w = c(m);
|
|
2459
2499
|
return {
|
|
2460
|
-
classList: [`lume-fill--${O}`, ...
|
|
2500
|
+
classList: [`lume-fill--${O}`, ...u],
|
|
2461
2501
|
x: b,
|
|
2462
2502
|
y: h,
|
|
2463
|
-
width:
|
|
2503
|
+
width: $,
|
|
2464
2504
|
height: w,
|
|
2465
2505
|
isFaded: a.value !== -1 && a.value !== g,
|
|
2466
2506
|
isNegative: m < 0
|
|
@@ -2468,10 +2508,10 @@ function nl(e, n, t, o, a, r) {
|
|
|
2468
2508
|
}
|
|
2469
2509
|
return { barAttributeGenerator: p };
|
|
2470
2510
|
}
|
|
2471
|
-
function
|
|
2511
|
+
function rl(e, n, t, o, a, u) {
|
|
2472
2512
|
const l = v(
|
|
2473
|
-
() => o.value ===
|
|
2474
|
-
), i = v(() =>
|
|
2513
|
+
() => o.value === H.HORIZONTAL
|
|
2514
|
+
), i = v(() => Ee().domain(e.value.map((m, T) => T)).range([0, n.value.bandwidth()]).padding(0)), s = v(() => Ee().domain(e.value.map((m, T) => T)).range([0, t.value.bandwidth()]).padding(0));
|
|
2475
2515
|
function c(m, T, O) {
|
|
2476
2516
|
if (l.value)
|
|
2477
2517
|
return m >= 0 ? n.value(0) : n.value(m);
|
|
@@ -2485,47 +2525,47 @@ function ol(e, n, t, o, a, r) {
|
|
|
2485
2525
|
}
|
|
2486
2526
|
return m < 0 ? t.value(0) : t.value(m);
|
|
2487
2527
|
}
|
|
2488
|
-
function
|
|
2528
|
+
function r(m) {
|
|
2489
2529
|
return l.value ? m < 0 ? n.value(0) - n.value(m) : n.value(m) - n.value(0) : i.value.bandwidth();
|
|
2490
2530
|
}
|
|
2491
2531
|
function f(m) {
|
|
2492
2532
|
return l.value ? s.value.bandwidth() : m < 0 ? t.value(m) - t.value(0) : t.value(0) - t.value(m);
|
|
2493
2533
|
}
|
|
2494
2534
|
function g(m, T, O) {
|
|
2495
|
-
const { value: b, color: h } = m,
|
|
2535
|
+
const { value: b, color: h } = m, $ = h ?? e.value[T].color ?? Object.values(ie)[T], w = c(b, O, T), N = p(b, O, T), E = r(b), D = f(b);
|
|
2496
2536
|
return {
|
|
2497
|
-
classList: [`lume-fill--${
|
|
2537
|
+
classList: [`lume-fill--${$}`, ...u],
|
|
2498
2538
|
x: w,
|
|
2499
|
-
y:
|
|
2500
|
-
width:
|
|
2501
|
-
height:
|
|
2539
|
+
y: N,
|
|
2540
|
+
width: E,
|
|
2541
|
+
height: D,
|
|
2502
2542
|
isFaded: a.value !== -1 && a.value !== O,
|
|
2503
2543
|
isNegative: b < 0
|
|
2504
2544
|
};
|
|
2505
2545
|
}
|
|
2506
2546
|
return { barAttributeGenerator: g };
|
|
2507
2547
|
}
|
|
2508
|
-
function
|
|
2548
|
+
function il(e, n, t) {
|
|
2509
2549
|
const o = v(
|
|
2510
|
-
() => n.value ===
|
|
2550
|
+
() => n.value === H.HORIZONTAL
|
|
2511
2551
|
), a = v(() => {
|
|
2512
2552
|
const s = e.value.map(
|
|
2513
|
-
(c) => c.filter((p) => p.value < 0).reduce((p,
|
|
2553
|
+
(c) => c.filter((p) => p.value < 0).reduce((p, r) => p + r.value, 0)
|
|
2514
2554
|
);
|
|
2515
2555
|
return Math.min(...s);
|
|
2516
|
-
}),
|
|
2556
|
+
}), u = v(() => {
|
|
2517
2557
|
const s = e.value.map(
|
|
2518
2558
|
(c) => c.reduce(
|
|
2519
|
-
(p,
|
|
2559
|
+
(p, r) => r.value >= 0 ? p + r.value : p,
|
|
2520
2560
|
0
|
|
2521
2561
|
)
|
|
2522
2562
|
);
|
|
2523
2563
|
return Math.max(...s);
|
|
2524
2564
|
});
|
|
2525
2565
|
function l(s, c, p) {
|
|
2526
|
-
return o.value ?
|
|
2527
|
-
|
|
2528
|
-
|
|
2566
|
+
return o.value ? Ne().domain([a.value, u.value]).range([0, p.width]) : Object.assign(
|
|
2567
|
+
$t(
|
|
2568
|
+
Ee().domain(c.map((r, f) => f)).range([0, p.width]),
|
|
2529
2569
|
n.value,
|
|
2530
2570
|
t.value
|
|
2531
2571
|
),
|
|
@@ -2534,32 +2574,32 @@ function al(e, n, t) {
|
|
|
2534
2574
|
}
|
|
2535
2575
|
function i(s, c, p) {
|
|
2536
2576
|
return o.value ? Object.assign(
|
|
2537
|
-
|
|
2538
|
-
|
|
2577
|
+
$t(
|
|
2578
|
+
Ee().domain(c.map((r, f) => f)).range([0, p.height]),
|
|
2539
2579
|
n.value,
|
|
2540
2580
|
t.value
|
|
2541
2581
|
),
|
|
2542
2582
|
{ labels: c }
|
|
2543
|
-
) :
|
|
2583
|
+
) : Ne().domain([u.value, a.value]).range([0, p.height]);
|
|
2544
2584
|
}
|
|
2545
2585
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2546
2586
|
}
|
|
2547
|
-
function
|
|
2587
|
+
function sl(e, n, t, o, a, u) {
|
|
2548
2588
|
const l = v(
|
|
2549
|
-
() => o.value ===
|
|
2589
|
+
() => o.value === H.HORIZONTAL
|
|
2550
2590
|
), i = v(
|
|
2551
2591
|
() => l.value ? t.value.domain() : n.value.domain()
|
|
2552
2592
|
), s = v(
|
|
2553
2593
|
() => e.value.map((b) => b.values.map((h) => h == null ? void 0 : h.value))
|
|
2554
2594
|
);
|
|
2555
|
-
function c(b, h,
|
|
2556
|
-
let w,
|
|
2557
|
-
return l.value ? (w = n.value(b >= 0 ? 0 +
|
|
2595
|
+
function c(b, h, $) {
|
|
2596
|
+
let w, N;
|
|
2597
|
+
return l.value ? (w = n.value(b >= 0 ? 0 + $ : b + $), N = t.value(i.value[h])) : (w = n.value(i.value[h]), N = t.value(b >= 0 ? b + $ : 0 + $)), { x: w, y: N };
|
|
2558
2598
|
}
|
|
2559
2599
|
function p(b) {
|
|
2560
2600
|
return l.value ? n.value(b) - n.value(0) : n.value.bandwidth();
|
|
2561
2601
|
}
|
|
2562
|
-
function
|
|
2602
|
+
function r(b) {
|
|
2563
2603
|
return l.value ? n.value(0) - n.value(b) : n.value.bandwidth();
|
|
2564
2604
|
}
|
|
2565
2605
|
function f(b) {
|
|
@@ -2569,41 +2609,41 @@ function ll(e, n, t, o, a, r) {
|
|
|
2569
2609
|
return l.value ? t.value.bandwidth() : t.value(b) - t.value(0);
|
|
2570
2610
|
}
|
|
2571
2611
|
function m(b, h) {
|
|
2572
|
-
return b ? s.value.reduce((
|
|
2612
|
+
return b ? s.value.reduce(($, w, N) => (N < b && w[h] >= 0 && ($ += w[h]), $), 0) : 0;
|
|
2573
2613
|
}
|
|
2574
2614
|
function T(b, h) {
|
|
2575
|
-
return b ? s.value.reduce((
|
|
2615
|
+
return b ? s.value.reduce(($, w, N) => (N < b && w[h] < 0 && ($ += w[h]), $), 0) : 0;
|
|
2576
2616
|
}
|
|
2577
|
-
function O(b, h,
|
|
2578
|
-
const { value: w, color:
|
|
2617
|
+
function O(b, h, $) {
|
|
2618
|
+
const { value: w, color: N } = b, E = w >= 0 ? p(w) : r(w), D = w >= 0 ? f(w) : g(w), V = w >= 0 ? m(h, $) : T(h, $), { x: U, y: ne } = c(w, $, V);
|
|
2579
2619
|
return {
|
|
2580
|
-
classList: [`lume-fill--${
|
|
2581
|
-
width:
|
|
2582
|
-
height:
|
|
2620
|
+
classList: [`lume-fill--${N ?? e.value[h].color ?? Object.values(ie)[h]}`, ...u],
|
|
2621
|
+
width: E,
|
|
2622
|
+
height: D,
|
|
2583
2623
|
x: U,
|
|
2584
|
-
y:
|
|
2585
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2624
|
+
y: ne,
|
|
2625
|
+
isFaded: a.value !== -1 && a.value !== $,
|
|
2586
2626
|
isNegative: w < 0
|
|
2587
2627
|
};
|
|
2588
2628
|
}
|
|
2589
2629
|
return { barAttributeGenerator: O };
|
|
2590
2630
|
}
|
|
2591
|
-
const
|
|
2631
|
+
const cl = {
|
|
2592
2632
|
class: "lume-bar-group",
|
|
2593
2633
|
"data-j-bars-group": ""
|
|
2594
|
-
},
|
|
2595
|
-
single:
|
|
2596
|
-
grouped:
|
|
2597
|
-
stacked:
|
|
2598
|
-
}, st = /* @__PURE__ */
|
|
2634
|
+
}, dl = ["onMouseenter"], vl = {
|
|
2635
|
+
single: ul,
|
|
2636
|
+
grouped: rl,
|
|
2637
|
+
stacked: sl
|
|
2638
|
+
}, st = /* @__PURE__ */ Z({
|
|
2599
2639
|
__name: "lume-bar-group",
|
|
2600
2640
|
props: {
|
|
2601
|
-
...
|
|
2641
|
+
...Ve(),
|
|
2602
2642
|
classList: {
|
|
2603
2643
|
type: [String, Array],
|
|
2604
2644
|
default: () => []
|
|
2605
2645
|
},
|
|
2606
|
-
...
|
|
2646
|
+
...ol(!0),
|
|
2607
2647
|
transition: {
|
|
2608
2648
|
type: Boolean,
|
|
2609
2649
|
default: !0
|
|
@@ -2613,188 +2653,188 @@ const rl = {
|
|
|
2613
2653
|
setup(e, { emit: n }) {
|
|
2614
2654
|
const t = e, o = n, {
|
|
2615
2655
|
data: a,
|
|
2616
|
-
hoveredIndex:
|
|
2656
|
+
hoveredIndex: u,
|
|
2617
2657
|
orientation: l,
|
|
2618
2658
|
transition: i,
|
|
2619
2659
|
type: s,
|
|
2620
2660
|
xScale: c,
|
|
2621
2661
|
yScale: p,
|
|
2622
|
-
classList:
|
|
2623
|
-
} =
|
|
2624
|
-
|
|
2625
|
-
const { emitInternalEvent: f } =
|
|
2626
|
-
const w =
|
|
2662
|
+
classList: r
|
|
2663
|
+
} = te(t);
|
|
2664
|
+
De("chartID");
|
|
2665
|
+
const { emitInternalEvent: f } = ye(), { groupedData: g } = tn(a), { barXScale: m, barYScale: T } = ll(c, p, l), O = v(() => typeof r.value == "string" ? [r.value] : r.value), b = v(() => {
|
|
2666
|
+
const w = al(a, s), { barAttributeGenerator: N } = vl[w](
|
|
2627
2667
|
a,
|
|
2628
2668
|
m,
|
|
2629
2669
|
T,
|
|
2630
2670
|
l,
|
|
2631
|
-
|
|
2671
|
+
u,
|
|
2632
2672
|
O.value
|
|
2633
2673
|
);
|
|
2634
|
-
return
|
|
2674
|
+
return N;
|
|
2635
2675
|
}), h = v(() => {
|
|
2636
2676
|
if (i.value)
|
|
2637
|
-
return l.value ===
|
|
2677
|
+
return l.value === H.HORIZONTAL ? "width" : "height";
|
|
2638
2678
|
});
|
|
2639
|
-
async function
|
|
2679
|
+
async function $(w) {
|
|
2640
2680
|
o("lume__internal--hover", w), f("lume__internal--hover", w);
|
|
2641
2681
|
}
|
|
2642
|
-
return (w,
|
|
2643
|
-
(
|
|
2644
|
-
key:
|
|
2645
|
-
onMouseenter: (
|
|
2682
|
+
return (w, N) => (_(), x("g", cl, [
|
|
2683
|
+
(_(!0), x(q, null, W(d(g), (E, D) => (_(), x("g", {
|
|
2684
|
+
key: D,
|
|
2685
|
+
onMouseenter: (V) => $(D)
|
|
2646
2686
|
}, [
|
|
2647
|
-
(
|
|
2687
|
+
(_(!0), x(q, null, W(E, (V, U) => (_(), K(d(ut), j(b.value(V, U, D, E), {
|
|
2648
2688
|
key: `bar-${U}`,
|
|
2649
2689
|
transition: h.value,
|
|
2650
2690
|
"data-j-lume-bar": "",
|
|
2651
|
-
onClick: (
|
|
2652
|
-
index:
|
|
2691
|
+
onClick: (ne) => o("bar-click", {
|
|
2692
|
+
index: D,
|
|
2653
2693
|
datasetIndex: U,
|
|
2654
|
-
event:
|
|
2694
|
+
event: ne
|
|
2655
2695
|
})
|
|
2656
2696
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
2657
|
-
], 40,
|
|
2697
|
+
], 40, dl))), 128))
|
|
2658
2698
|
]));
|
|
2659
2699
|
}
|
|
2660
|
-
}),
|
|
2661
|
-
[
|
|
2700
|
+
}), ml = {
|
|
2701
|
+
[H.VERTICAL]: {
|
|
2662
2702
|
withTooltip: !0,
|
|
2663
2703
|
xAxisOptions: {},
|
|
2664
2704
|
yAxisOptions: { gridLines: !0 },
|
|
2665
|
-
margins:
|
|
2705
|
+
margins: Te.VERTICAL
|
|
2666
2706
|
},
|
|
2667
|
-
[
|
|
2707
|
+
[H.HORIZONTAL]: {
|
|
2668
2708
|
withTooltip: !0,
|
|
2669
2709
|
xAxisOptions: { gridLines: !0 },
|
|
2670
2710
|
yAxisOptions: { gridLines: !1 },
|
|
2671
|
-
margins:
|
|
2711
|
+
margins: Te.HORIZONTAL
|
|
2672
2712
|
}
|
|
2673
|
-
},
|
|
2713
|
+
}, Fl = /* @__PURE__ */ Z({
|
|
2674
2714
|
__name: "lume-single-bar-chart",
|
|
2675
2715
|
props: {
|
|
2676
|
-
|
|
2716
|
+
...Ie(nt)
|
|
2677
2717
|
},
|
|
2678
2718
|
setup(e, { emit: n }) {
|
|
2679
|
-
const t = e, { componentEventPropagator: o } =
|
|
2680
|
-
() =>
|
|
2719
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Le(ue()), { orientation: u, options: l } = te(t), i = v(
|
|
2720
|
+
() => ml[u.value || H.VERTICAL]
|
|
2681
2721
|
// needs to be computed so that default options are reactive
|
|
2682
|
-
), { allOptions: s } =
|
|
2683
|
-
return (c, p) => (
|
|
2722
|
+
), { allOptions: s } = me(l, i);
|
|
2723
|
+
return (c, p) => (_(), K(d(we), j(t, {
|
|
2684
2724
|
"chart-type": "single-bar",
|
|
2685
2725
|
options: d(s),
|
|
2686
2726
|
"data-j-single-bar-chart": ""
|
|
2687
|
-
},
|
|
2688
|
-
groups: P((
|
|
2689
|
-
re(d(st),
|
|
2727
|
+
}, le(d(o))), ce({
|
|
2728
|
+
groups: P((r) => [
|
|
2729
|
+
re(d(st), j(r, { orientation: d(u) }, le(d(o))), null, 16, ["orientation"])
|
|
2690
2730
|
]),
|
|
2691
2731
|
_: 2
|
|
2692
2732
|
}, [
|
|
2693
|
-
|
|
2733
|
+
W(d(a), (r, f) => ({
|
|
2694
2734
|
name: f,
|
|
2695
2735
|
fn: P((g) => [
|
|
2696
|
-
|
|
2736
|
+
C(c.$slots, f, fe(he(g || {})))
|
|
2697
2737
|
])
|
|
2698
2738
|
}))
|
|
2699
2739
|
]), 1040, ["options"]));
|
|
2700
2740
|
}
|
|
2701
|
-
}),
|
|
2702
|
-
[
|
|
2741
|
+
}), pl = {
|
|
2742
|
+
[H.VERTICAL]: {
|
|
2703
2743
|
withTooltip: !0,
|
|
2704
2744
|
xAxisOptions: {},
|
|
2705
2745
|
yAxisOptions: { gridLines: !0 },
|
|
2706
|
-
margins:
|
|
2746
|
+
margins: Te.VERTICAL
|
|
2707
2747
|
},
|
|
2708
|
-
[
|
|
2748
|
+
[H.HORIZONTAL]: {
|
|
2709
2749
|
withTooltip: !0,
|
|
2710
2750
|
xAxisOptions: { gridLines: !0 },
|
|
2711
2751
|
yAxisOptions: { gridLines: !1 },
|
|
2712
|
-
margins:
|
|
2752
|
+
margins: Te.HORIZONTAL,
|
|
2713
2753
|
tooltipOptions: { position: "right" }
|
|
2714
2754
|
}
|
|
2715
|
-
},
|
|
2755
|
+
}, zl = /* @__PURE__ */ Z({
|
|
2716
2756
|
__name: "lume-grouped-bar-chart",
|
|
2717
2757
|
props: {
|
|
2718
|
-
|
|
2758
|
+
...Ie()
|
|
2719
2759
|
},
|
|
2720
2760
|
setup(e, { emit: n }) {
|
|
2721
|
-
const t = e, { componentEventPropagator: o } =
|
|
2722
|
-
() =>
|
|
2761
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Le(ue()), { orientation: u, options: l } = te(t), i = v(
|
|
2762
|
+
() => pl[u.value || H.VERTICAL]
|
|
2723
2763
|
// needs to be computed so that default options are reactive
|
|
2724
|
-
), { allOptions: s } =
|
|
2764
|
+
), { allOptions: s } = me(
|
|
2725
2765
|
l,
|
|
2726
2766
|
i
|
|
2727
2767
|
);
|
|
2728
|
-
return (c, p) => (
|
|
2768
|
+
return (c, p) => (_(), K(d(we), j(t, {
|
|
2729
2769
|
"chart-type": "grouped-bar",
|
|
2730
2770
|
options: d(s),
|
|
2731
2771
|
"data-j-grouped-bar-chart": ""
|
|
2732
|
-
},
|
|
2733
|
-
groups: P((
|
|
2734
|
-
re(d(st),
|
|
2772
|
+
}, le(d(o))), ce({
|
|
2773
|
+
groups: P((r) => [
|
|
2774
|
+
re(d(st), j(r, { type: "grouped" }, le(d(o))), null, 16)
|
|
2735
2775
|
]),
|
|
2736
2776
|
_: 2
|
|
2737
2777
|
}, [
|
|
2738
|
-
|
|
2778
|
+
W(d(a), (r, f) => ({
|
|
2739
2779
|
name: f,
|
|
2740
2780
|
fn: P((g) => [
|
|
2741
|
-
|
|
2781
|
+
C(c.$slots, f, fe(he(g || {})))
|
|
2742
2782
|
])
|
|
2743
2783
|
}))
|
|
2744
2784
|
]), 1040, ["options"]));
|
|
2745
2785
|
}
|
|
2746
|
-
}),
|
|
2747
|
-
[
|
|
2786
|
+
}), fl = {
|
|
2787
|
+
[H.VERTICAL]: {
|
|
2748
2788
|
withTooltip: !0,
|
|
2749
2789
|
xAxisOptions: {},
|
|
2750
2790
|
yAxisOptions: { gridLines: !0 },
|
|
2751
|
-
margins:
|
|
2791
|
+
margins: Te.VERTICAL
|
|
2752
2792
|
},
|
|
2753
|
-
[
|
|
2793
|
+
[H.HORIZONTAL]: {
|
|
2754
2794
|
withTooltip: !0,
|
|
2755
2795
|
xAxisOptions: { gridLines: !0 },
|
|
2756
2796
|
yAxisOptions: { gridLines: !1 },
|
|
2757
|
-
margins:
|
|
2797
|
+
margins: Te.HORIZONTAL,
|
|
2758
2798
|
tooltipOptions: { position: "right" }
|
|
2759
2799
|
}
|
|
2760
|
-
},
|
|
2800
|
+
}, Wl = /* @__PURE__ */ Z({
|
|
2761
2801
|
__name: "lume-stacked-bar-chart",
|
|
2762
2802
|
props: {
|
|
2763
|
-
|
|
2803
|
+
...Ie()
|
|
2764
2804
|
},
|
|
2765
2805
|
setup(e, { emit: n }) {
|
|
2766
|
-
const t = e, { componentEventPropagator: o } =
|
|
2767
|
-
() =>
|
|
2806
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Le(ue()), { data: u, orientation: l, options: i } = te(t), s = v(
|
|
2807
|
+
() => fl[l.value || H.VERTICAL]
|
|
2768
2808
|
// needs to be computed so that default options are reactive
|
|
2769
|
-
), { allOptions: c } =
|
|
2809
|
+
), { allOptions: c } = me(
|
|
2770
2810
|
i,
|
|
2771
2811
|
s
|
|
2772
|
-
), { internalData: p } = it(
|
|
2773
|
-
|
|
2812
|
+
), { internalData: p } = it(u), { groupedData: r } = tn(p), { stackedXScaleGenerator: f, stackedYScaleGenerator: g } = il(
|
|
2813
|
+
r,
|
|
2774
2814
|
l,
|
|
2775
2815
|
i
|
|
2776
2816
|
);
|
|
2777
|
-
return (m, T) => (
|
|
2817
|
+
return (m, T) => (_(), K(d(we), j(t, {
|
|
2778
2818
|
"chart-type": "stacked-bar",
|
|
2779
2819
|
options: d(c),
|
|
2780
2820
|
"x-scale": d(f),
|
|
2781
2821
|
"y-scale": d(g),
|
|
2782
2822
|
"data-j-stacked-bar-chart": ""
|
|
2783
|
-
},
|
|
2823
|
+
}, le(d(o))), ce({
|
|
2784
2824
|
groups: P((O) => [
|
|
2785
|
-
re(d(st),
|
|
2825
|
+
re(d(st), j(O, { type: "stacked" }, le(d(o))), null, 16)
|
|
2786
2826
|
]),
|
|
2787
2827
|
_: 2
|
|
2788
2828
|
}, [
|
|
2789
|
-
|
|
2829
|
+
W(d(a), (O, b) => ({
|
|
2790
2830
|
name: b,
|
|
2791
2831
|
fn: P((h) => [
|
|
2792
|
-
|
|
2832
|
+
C(m.$slots, b, fe(he(h || {})))
|
|
2793
2833
|
])
|
|
2794
2834
|
}))
|
|
2795
2835
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
2796
2836
|
}
|
|
2797
|
-
}),
|
|
2837
|
+
}), hl = ["d", "stroke-width"], gl = 2, _l = /* @__PURE__ */ Z({
|
|
2798
2838
|
__name: "lume-line",
|
|
2799
2839
|
props: {
|
|
2800
2840
|
pathDefinition: {
|
|
@@ -2803,11 +2843,11 @@ const rl = {
|
|
|
2803
2843
|
},
|
|
2804
2844
|
width: {
|
|
2805
2845
|
type: Number,
|
|
2806
|
-
default:
|
|
2846
|
+
default: gl
|
|
2807
2847
|
},
|
|
2808
2848
|
color: {
|
|
2809
2849
|
type: String,
|
|
2810
|
-
default:
|
|
2850
|
+
default: ie.Skyblue
|
|
2811
2851
|
},
|
|
2812
2852
|
dashed: {
|
|
2813
2853
|
type: Boolean,
|
|
@@ -2829,37 +2869,37 @@ const rl = {
|
|
|
2829
2869
|
emits: ["click"],
|
|
2830
2870
|
setup(e, { emit: n }) {
|
|
2831
2871
|
const t = n, o = R(null);
|
|
2832
|
-
return
|
|
2872
|
+
return _e(() => je(o.value)), (a, u) => (_(), x("path", {
|
|
2833
2873
|
ref_key: "root",
|
|
2834
2874
|
ref: o,
|
|
2835
|
-
class:
|
|
2875
|
+
class: oe(["lume-line", {
|
|
2836
2876
|
[`lume-stroke--${e.color}`]: !0,
|
|
2837
2877
|
"lume-line--dashed": e.dashed,
|
|
2838
2878
|
"lume-line--transition": e.transition
|
|
2839
2879
|
}]),
|
|
2840
2880
|
d: e.pathDefinition,
|
|
2841
2881
|
"stroke-width": e.width,
|
|
2842
|
-
style:
|
|
2882
|
+
style: Bt({
|
|
2843
2883
|
animationDelay: e.transition && e.animationDelay + "s",
|
|
2844
2884
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2845
2885
|
}),
|
|
2846
2886
|
"data-j-line": "",
|
|
2847
|
-
onClick:
|
|
2848
|
-
}, null, 14,
|
|
2887
|
+
onClick: u[0] || (u[0] = (l) => t("click", l))
|
|
2888
|
+
}, null, 14, hl));
|
|
2849
2889
|
}
|
|
2850
2890
|
});
|
|
2851
|
-
const
|
|
2891
|
+
const yl = /* @__PURE__ */ ee(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx", "cy", "r", "stroke-width"], bl = 4, Al = /* @__PURE__ */ Z({
|
|
2852
2892
|
__name: "lume-point",
|
|
2853
2893
|
props: {
|
|
2854
2894
|
x: { type: Number, required: !0 },
|
|
2855
2895
|
y: { type: Number, required: !0 },
|
|
2856
2896
|
color: {
|
|
2857
2897
|
type: String,
|
|
2858
|
-
default:
|
|
2898
|
+
default: ie.Skyblue
|
|
2859
2899
|
},
|
|
2860
2900
|
radius: {
|
|
2861
2901
|
type: Number,
|
|
2862
|
-
default:
|
|
2902
|
+
default: bl
|
|
2863
2903
|
},
|
|
2864
2904
|
active: {
|
|
2865
2905
|
type: Boolean,
|
|
@@ -2868,50 +2908,50 @@ const fl = /* @__PURE__ */ q(pl, [["__scopeId", "data-v-08896455"]]), hl = ["cx"
|
|
|
2868
2908
|
},
|
|
2869
2909
|
emits: ["click"],
|
|
2870
2910
|
setup(e, { emit: n }) {
|
|
2871
|
-
const t = e, o = n, a = R(null),
|
|
2872
|
-
return
|
|
2911
|
+
const t = e, o = n, a = R(null), u = v(() => t.radius / 2);
|
|
2912
|
+
return _e(() => je(a.value)), (l, i) => (_(), x("circle", {
|
|
2873
2913
|
ref_key: "root",
|
|
2874
2914
|
ref: a,
|
|
2875
|
-
class:
|
|
2915
|
+
class: oe(["lume-point", `lume-stroke--${e.color}`]),
|
|
2876
2916
|
cx: e.x,
|
|
2877
2917
|
cy: e.y,
|
|
2878
2918
|
r: e.active ? e.radius : 0,
|
|
2879
|
-
"stroke-width":
|
|
2919
|
+
"stroke-width": u.value,
|
|
2880
2920
|
"data-j-point": "",
|
|
2881
2921
|
onClick: i[0] || (i[0] = (s) => o("click", s))
|
|
2882
|
-
}, null, 10,
|
|
2922
|
+
}, null, 10, kl));
|
|
2883
2923
|
}
|
|
2884
2924
|
});
|
|
2885
|
-
const
|
|
2886
|
-
function
|
|
2887
|
-
function n(
|
|
2925
|
+
const Tl = /* @__PURE__ */ ee(Al, [["__scopeId", "data-v-b6745177"]]);
|
|
2926
|
+
function nn(e) {
|
|
2927
|
+
function n(u) {
|
|
2888
2928
|
let l = null;
|
|
2889
|
-
return
|
|
2929
|
+
return u == null ? void 0 : u.reduce((i, s, c) => (s == null || s.value == null ? (l ? l.push(c) : l = [c], c === (u == null ? void 0 : u.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
2890
2930
|
}
|
|
2891
|
-
function t(
|
|
2892
|
-
const
|
|
2893
|
-
return
|
|
2931
|
+
function t(u, l, i, s) {
|
|
2932
|
+
const r = Math.abs(u - l) / (i + 1) * (s + 1);
|
|
2933
|
+
return u > l ? u - r : u + r;
|
|
2894
2934
|
}
|
|
2895
|
-
function o(
|
|
2935
|
+
function o(u) {
|
|
2896
2936
|
return function(i) {
|
|
2897
|
-
return !!
|
|
2937
|
+
return !!u.find(
|
|
2898
2938
|
(s) => s.includes(i) || s.includes(i - 1)
|
|
2899
2939
|
);
|
|
2900
2940
|
};
|
|
2901
2941
|
}
|
|
2902
|
-
return { computedLineData: v(() => e.value.map((
|
|
2903
|
-
const l = n(
|
|
2942
|
+
return { computedLineData: v(() => e.value.map((u) => {
|
|
2943
|
+
const l = n(u.values);
|
|
2904
2944
|
return {
|
|
2905
|
-
...
|
|
2945
|
+
...u,
|
|
2906
2946
|
isDashed: o(l),
|
|
2907
|
-
values:
|
|
2908
|
-
var p,
|
|
2947
|
+
values: u.values.map((i, s) => {
|
|
2948
|
+
var p, r;
|
|
2909
2949
|
const c = l.find(
|
|
2910
2950
|
(f) => f.includes(s)
|
|
2911
2951
|
);
|
|
2912
2952
|
if (c) {
|
|
2913
2953
|
const f = c[0] - 1, g = c[c.length - 1] + 1;
|
|
2914
|
-
let m = (p =
|
|
2954
|
+
let m = (p = u.values[f]) == null ? void 0 : p.value, T = (r = u.values[g]) == null ? void 0 : r.value;
|
|
2915
2955
|
return m == null && (m = T), T == null && (T = m), {
|
|
2916
2956
|
value: t(
|
|
2917
2957
|
m,
|
|
@@ -2919,7 +2959,7 @@ function qt(e) {
|
|
|
2919
2959
|
c.length,
|
|
2920
2960
|
c.indexOf(s)
|
|
2921
2961
|
),
|
|
2922
|
-
label:
|
|
2962
|
+
label: Pt
|
|
2923
2963
|
};
|
|
2924
2964
|
}
|
|
2925
2965
|
return i;
|
|
@@ -2927,29 +2967,29 @@ function qt(e) {
|
|
|
2927
2967
|
};
|
|
2928
2968
|
})) };
|
|
2929
2969
|
}
|
|
2930
|
-
function
|
|
2970
|
+
function Ll(e, n) {
|
|
2931
2971
|
const t = e.bandwidth() / 2;
|
|
2932
2972
|
return (o, a) => e(e.domain()[n + (a - 1)]) + t;
|
|
2933
2973
|
}
|
|
2934
|
-
function
|
|
2974
|
+
function Ol(e, n) {
|
|
2935
2975
|
return (t, o) => e(n + (o - 1));
|
|
2936
2976
|
}
|
|
2937
|
-
function
|
|
2938
|
-
return
|
|
2939
|
-
|
|
2940
|
-
).y((
|
|
2977
|
+
function xl(e, n, t, o) {
|
|
2978
|
+
return hn().x(
|
|
2979
|
+
de(t) ? Ll(t, e) : Ol(t, e)
|
|
2980
|
+
).y((u) => o(u))(n);
|
|
2941
2981
|
}
|
|
2942
|
-
const
|
|
2982
|
+
const $l = {
|
|
2943
2983
|
class: "lume-line-group",
|
|
2944
2984
|
"data-j-lume-line-group": ""
|
|
2945
|
-
},
|
|
2985
|
+
}, Il = { class: "lume-line-group__lines" }, wl = {
|
|
2946
2986
|
key: 0,
|
|
2947
2987
|
class: "lume-line-group__points",
|
|
2948
2988
|
"data-j-lume-line-group__points": ""
|
|
2949
|
-
},
|
|
2989
|
+
}, El = 1, Nl = /* @__PURE__ */ Z({
|
|
2950
2990
|
__name: "lume-line-group",
|
|
2951
2991
|
props: {
|
|
2952
|
-
...
|
|
2992
|
+
...Ve(),
|
|
2953
2993
|
withPoints: {
|
|
2954
2994
|
type: Boolean,
|
|
2955
2995
|
default: !0
|
|
@@ -2961,155 +3001,155 @@ const Tl = {
|
|
|
2961
3001
|
},
|
|
2962
3002
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2963
3003
|
setup(e, { emit: n }) {
|
|
2964
|
-
const t = e, o = n, { data: a, options:
|
|
3004
|
+
const t = e, o = n, { data: a, options: u, xScale: l, yScale: i } = te(t), s = De(
|
|
2965
3005
|
"tooltipAnchorAttributes",
|
|
2966
3006
|
null
|
|
2967
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
3007
|
+
), { updateTooltipAnchorAttributes: c } = Jt(
|
|
2968
3008
|
s,
|
|
2969
|
-
|
|
3009
|
+
u,
|
|
2970
3010
|
l,
|
|
2971
3011
|
i
|
|
2972
3012
|
), p = v(() => {
|
|
2973
|
-
if (a.value.every((
|
|
3013
|
+
if (a.value.every((D) => D.isDashed))
|
|
2974
3014
|
return a.value;
|
|
2975
|
-
const { computedLineData:
|
|
2976
|
-
return
|
|
2977
|
-
}),
|
|
3015
|
+
const { computedLineData: E } = nn(a);
|
|
3016
|
+
return u.value.withTooltip !== !1 && (s != null && s.value) && c(E.value), E.value;
|
|
3017
|
+
}), r = v(() => {
|
|
2978
3018
|
if (t.hoveredIndex === -1)
|
|
2979
3019
|
return;
|
|
2980
|
-
const
|
|
3020
|
+
const E = wn(
|
|
2981
3021
|
p.value,
|
|
2982
3022
|
t.hoveredIndex
|
|
2983
3023
|
);
|
|
2984
3024
|
return {
|
|
2985
3025
|
d: `M ${Ye(l.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
2986
|
-
V ${i.value(
|
|
3026
|
+
V ${i.value(E)}`
|
|
2987
3027
|
// Move to X index, Vertical line to the highest point
|
|
2988
3028
|
};
|
|
2989
3029
|
}), f = v(
|
|
2990
|
-
() => l.value &&
|
|
3030
|
+
() => l.value && El / (En(l.value) - 1)
|
|
2991
3031
|
// Subtracting the first line (read below)
|
|
2992
3032
|
), g = v(
|
|
2993
3033
|
() => {
|
|
2994
|
-
var
|
|
2995
|
-
return ((
|
|
3034
|
+
var E;
|
|
3035
|
+
return ((E = u.value) == null ? void 0 : E.lineWidth) * 2 || void 0;
|
|
2996
3036
|
}
|
|
2997
3037
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2998
3038
|
), m = v(
|
|
2999
3039
|
() => l.value.bandwidth() / 2
|
|
3000
3040
|
), T = v(() => l.value.domain()), O = v(
|
|
3001
|
-
() =>
|
|
3041
|
+
() => u.value.withPoints ?? t.withPoints
|
|
3002
3042
|
);
|
|
3003
|
-
function b(
|
|
3004
|
-
return p.value[
|
|
3043
|
+
function b(E) {
|
|
3044
|
+
return p.value[E].values;
|
|
3005
3045
|
}
|
|
3006
|
-
function h(
|
|
3007
|
-
var U,
|
|
3008
|
-
const
|
|
3009
|
-
(U = b(
|
|
3010
|
-
(
|
|
3046
|
+
function h(E, D) {
|
|
3047
|
+
var U, ne;
|
|
3048
|
+
const V = E === 0 ? [] : [
|
|
3049
|
+
(U = b(D)[E - 1]) == null ? void 0 : U.value,
|
|
3050
|
+
(ne = b(D)[E]) == null ? void 0 : ne.value
|
|
3011
3051
|
];
|
|
3012
|
-
return
|
|
3013
|
-
|
|
3014
|
-
|
|
3052
|
+
return xl(
|
|
3053
|
+
E,
|
|
3054
|
+
V,
|
|
3015
3055
|
l.value,
|
|
3016
3056
|
i.value
|
|
3017
3057
|
) || "";
|
|
3018
3058
|
}
|
|
3019
|
-
function
|
|
3059
|
+
function $(E) {
|
|
3020
3060
|
return {
|
|
3021
|
-
animationDelay:
|
|
3061
|
+
animationDelay: E < 2 ? 0 : (E - 1) * f.value,
|
|
3022
3062
|
animationDuration: f.value
|
|
3023
3063
|
};
|
|
3024
3064
|
}
|
|
3025
|
-
function w(
|
|
3065
|
+
function w(E, D) {
|
|
3026
3066
|
var U;
|
|
3027
|
-
const
|
|
3067
|
+
const V = (U = b(D)[E]) == null ? void 0 : U.value;
|
|
3028
3068
|
return {
|
|
3029
|
-
x:
|
|
3030
|
-
y: i.value(
|
|
3069
|
+
x: de(l.value) ? t.xScale(T.value[E]) + m.value : t.xScale(E),
|
|
3070
|
+
y: i.value(V)
|
|
3031
3071
|
};
|
|
3032
3072
|
}
|
|
3033
|
-
function
|
|
3034
|
-
return t.hoveredIndex ===
|
|
3073
|
+
function N(E) {
|
|
3074
|
+
return t.hoveredIndex === E;
|
|
3035
3075
|
}
|
|
3036
|
-
return (
|
|
3037
|
-
|
|
3076
|
+
return (E, D) => (_(), x("g", $l, [
|
|
3077
|
+
G("path", j(r.value, {
|
|
3038
3078
|
class: "lume-line-group__overlay-line",
|
|
3039
3079
|
"data-j-lume-line-group__overlay-line": ""
|
|
3040
3080
|
}), null, 16),
|
|
3041
|
-
(
|
|
3042
|
-
key:
|
|
3081
|
+
(_(!0), x(q, null, W(p.value, (V, U) => (_(), x("g", {
|
|
3082
|
+
key: V.label,
|
|
3043
3083
|
class: "lume-line-group__group"
|
|
3044
3084
|
}, [
|
|
3045
|
-
|
|
3046
|
-
(
|
|
3085
|
+
G("g", Il, [
|
|
3086
|
+
(_(!0), x(q, null, W(V.values, (ne, F) => (_(), K(d(yl), j($(F), {
|
|
3047
3087
|
key: `line-${F}`,
|
|
3048
|
-
color:
|
|
3049
|
-
dashed:
|
|
3088
|
+
color: V.color,
|
|
3089
|
+
dashed: V.isDashed(F),
|
|
3050
3090
|
"path-definition": h(F, U),
|
|
3051
3091
|
transition: e.transition,
|
|
3052
|
-
width: d(
|
|
3053
|
-
onClick: (
|
|
3092
|
+
width: d(u).lineWidth,
|
|
3093
|
+
onClick: (Q) => o("line-click", { index: F, datasetIndex: U, event: Q })
|
|
3054
3094
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3055
3095
|
]),
|
|
3056
|
-
O.value ? (
|
|
3057
|
-
(
|
|
3096
|
+
O.value ? (_(), x("g", wl, [
|
|
3097
|
+
(_(!0), x(q, null, W(V.values, (ne, F) => (_(), K(d(Tl), j(w(F, U), {
|
|
3058
3098
|
key: `point-${F}`,
|
|
3059
|
-
active:
|
|
3060
|
-
color:
|
|
3099
|
+
active: N(F),
|
|
3100
|
+
color: V.color,
|
|
3061
3101
|
index: F,
|
|
3062
3102
|
radius: g.value,
|
|
3063
|
-
onClick: (
|
|
3103
|
+
onClick: (Q) => o("point-click", { index: F, datasetIndex: U, event: Q })
|
|
3064
3104
|
}), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
|
|
3065
3105
|
])) : z("", !0)
|
|
3066
3106
|
]))), 128))
|
|
3067
3107
|
]));
|
|
3068
3108
|
}
|
|
3069
3109
|
});
|
|
3070
|
-
const
|
|
3071
|
-
margins:
|
|
3110
|
+
const on = /* @__PURE__ */ ee(Nl, [["__scopeId", "data-v-c4d7f0ca"]]), Dl = {
|
|
3111
|
+
margins: Te.VERTICAL,
|
|
3072
3112
|
startOnZero: !0,
|
|
3073
3113
|
withTooltip: !0,
|
|
3074
3114
|
xAxisOptions: {},
|
|
3075
3115
|
yAxisOptions: { gridLines: !0 }
|
|
3076
|
-
},
|
|
3116
|
+
}, Zl = /* @__PURE__ */ Z({
|
|
3077
3117
|
__name: "lume-line-chart",
|
|
3078
3118
|
props: {
|
|
3079
|
-
|
|
3119
|
+
...Ie(null, !1)
|
|
3080
3120
|
},
|
|
3081
3121
|
setup(e, { emit: n }) {
|
|
3082
|
-
const t = e, { componentEventPropagator: o } =
|
|
3083
|
-
return (i, s) => (
|
|
3122
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Le(ue()), { options: u } = te(t), { allOptions: l } = me(u, Dl);
|
|
3123
|
+
return (i, s) => (_(), K(d(we), j(t, {
|
|
3084
3124
|
"chart-type": "line",
|
|
3085
3125
|
options: d(l),
|
|
3086
3126
|
"data-j-lume-line-chart": ""
|
|
3087
|
-
},
|
|
3127
|
+
}, le(d(o))), ce({
|
|
3088
3128
|
groups: P((c) => [
|
|
3089
|
-
re(d(
|
|
3129
|
+
re(d(on), j(c, le(d(o))), null, 16)
|
|
3090
3130
|
]),
|
|
3091
3131
|
_: 2
|
|
3092
3132
|
}, [
|
|
3093
|
-
|
|
3133
|
+
W(d(a), (c, p) => ({
|
|
3094
3134
|
name: p,
|
|
3095
|
-
fn: P((
|
|
3096
|
-
|
|
3135
|
+
fn: P((r) => [
|
|
3136
|
+
C(i.$slots, p, fe(he(r || {})))
|
|
3097
3137
|
])
|
|
3098
3138
|
}))
|
|
3099
3139
|
]), 1040, ["options"]));
|
|
3100
3140
|
}
|
|
3101
3141
|
});
|
|
3102
|
-
function
|
|
3142
|
+
function Hl(e) {
|
|
3103
3143
|
return { areaPathDefinition: v(
|
|
3104
3144
|
() => function(t, o) {
|
|
3105
|
-
if (!t || !o)
|
|
3145
|
+
if (!t || !o || de(t) || de(o))
|
|
3106
3146
|
return;
|
|
3107
3147
|
const a = e.value[0].values;
|
|
3108
|
-
return
|
|
3148
|
+
return gn().x((u, l) => t(l)).y0(o(Math.min(...o.domain()))).y1((u) => o(u.value))(a);
|
|
3109
3149
|
}
|
|
3110
3150
|
) };
|
|
3111
3151
|
}
|
|
3112
|
-
const
|
|
3152
|
+
const Ml = {
|
|
3113
3153
|
margins: {
|
|
3114
3154
|
top: 0,
|
|
3115
3155
|
right: 0,
|
|
@@ -3123,14 +3163,14 @@ const El = {
|
|
|
3123
3163
|
tooltipOptions: {
|
|
3124
3164
|
showTitle: !1
|
|
3125
3165
|
}
|
|
3126
|
-
},
|
|
3166
|
+
}, Bl = ["d"], Rl = /* @__PURE__ */ Z({
|
|
3127
3167
|
__name: "lume-sparkline-chart",
|
|
3128
3168
|
props: {
|
|
3129
|
-
...
|
|
3130
|
-
...
|
|
3169
|
+
...rt(null),
|
|
3170
|
+
...He()
|
|
3131
3171
|
},
|
|
3132
3172
|
setup(e, { expose: n, emit: t }) {
|
|
3133
|
-
const o = e, { componentEventPropagator: a } =
|
|
3173
|
+
const o = e, { componentEventPropagator: a } = ye(), u = Le(ue()), { data: l, options: i } = te(o), { internalData: s } = it(l), { allOptions: c } = me(i, Ml), { computedLineData: p } = nn(s), { areaPathDefinition: r } = Hl(p), f = v(() => s.value[0].color), g = v(
|
|
3134
3174
|
() => l.value[0].areaColor || f.value
|
|
3135
3175
|
);
|
|
3136
3176
|
function m(O) {
|
|
@@ -3140,65 +3180,65 @@ const El = {
|
|
|
3140
3180
|
};
|
|
3141
3181
|
}
|
|
3142
3182
|
function T(O, b, h) {
|
|
3143
|
-
return
|
|
3183
|
+
return Ne().range([0, h.width]).domain([0, O[0].values.length - 1]);
|
|
3144
3184
|
}
|
|
3145
3185
|
return n({
|
|
3146
|
-
areaPathDefinition:
|
|
3147
|
-
}), (O, b) => (
|
|
3186
|
+
areaPathDefinition: r
|
|
3187
|
+
}), (O, b) => (_(), K(d(we), j(o, {
|
|
3148
3188
|
"chart-type": "line",
|
|
3149
3189
|
options: m(d(c)),
|
|
3150
3190
|
"x-scale": T
|
|
3151
|
-
},
|
|
3191
|
+
}, le(d(a))), ce({
|
|
3152
3192
|
groups: P((h) => [
|
|
3153
|
-
d(c).showArea ? (
|
|
3193
|
+
d(c).showArea ? (_(), x("path", {
|
|
3154
3194
|
key: 0,
|
|
3155
|
-
class:
|
|
3195
|
+
class: oe([
|
|
3156
3196
|
"sparkline-chart__area",
|
|
3157
3197
|
d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3158
3198
|
`lume-fill--${g.value || f.value}`,
|
|
3159
3199
|
"lume-fill--faded"
|
|
3160
3200
|
]),
|
|
3161
|
-
d: d(
|
|
3201
|
+
d: d(r)(h.xScale, h.yScale),
|
|
3162
3202
|
"data-j-sparkline__area": ""
|
|
3163
|
-
}, null, 10,
|
|
3164
|
-
re(d(
|
|
3203
|
+
}, null, 10, Bl)) : z("", !0),
|
|
3204
|
+
re(d(on), j(h, { "with-points": !1 }, le(d(a))), null, 16)
|
|
3165
3205
|
]),
|
|
3166
3206
|
_: 2
|
|
3167
3207
|
}, [
|
|
3168
|
-
|
|
3169
|
-
name:
|
|
3208
|
+
W(d(u), (h, $) => ({
|
|
3209
|
+
name: $,
|
|
3170
3210
|
fn: P((w) => [
|
|
3171
|
-
|
|
3211
|
+
C(O.$slots, $, fe(he(w || {})), void 0, !0)
|
|
3172
3212
|
])
|
|
3173
3213
|
}))
|
|
3174
3214
|
]), 1040, ["options"]));
|
|
3175
3215
|
}
|
|
3176
3216
|
});
|
|
3177
|
-
const
|
|
3217
|
+
const Ul = /* @__PURE__ */ ee(Rl, [["__scopeId", "data-v-c681fff6"]]);
|
|
3178
3218
|
export {
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3219
|
+
Vl as LumeAlluvialDiagram,
|
|
3220
|
+
qa as LumeAlluvialGroup,
|
|
3221
|
+
_a as LumeAlluvialNodeLabel,
|
|
3222
|
+
ba as LumeAlluvialNodeValue,
|
|
3223
|
+
kt as LumeAxis,
|
|
3224
|
+
ut as LumeBar,
|
|
3225
|
+
Pl as LumeBarChart,
|
|
3186
3226
|
st as LumeBarGroup,
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3227
|
+
we as LumeChart,
|
|
3228
|
+
uo as LumeChartContainer,
|
|
3229
|
+
bt as LumeChartLegend,
|
|
3230
|
+
zl as LumeGroupedBarChart,
|
|
3231
|
+
yl as LumeLine,
|
|
3232
|
+
Zl as LumeLineChart,
|
|
3233
|
+
on as LumeLineGroup,
|
|
3234
|
+
Wo as LumeOverlayGroup,
|
|
3235
|
+
Tl as LumePoint,
|
|
3236
|
+
Fl as LumeSingleBarChart,
|
|
3237
|
+
Ul as LumeSparklineChart,
|
|
3238
|
+
Wl as LumeStackedBarChart,
|
|
3239
|
+
Eo as LumeTooltip,
|
|
3240
|
+
To as LumeTooltipItem,
|
|
3241
|
+
_o as LumeTooltipSummary,
|
|
3242
|
+
mo as LumeTooltipTitle
|
|
3203
3243
|
};
|
|
3204
3244
|
//# sourceMappingURL=index.js.map
|