@adyen/lume-vue3 1.5.2 → 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 +1125 -1083
- 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 +5 -3
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
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,18 +932,18 @@ 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
|
}
|
|
@@ -956,58 +955,58 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
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 ? (
|
|
977
|
-
default:
|
|
978
|
-
|
|
973
|
+
C(N.$slots, "default", {}, () => [
|
|
974
|
+
C(N.$slots, "title", {}, () => [
|
|
975
|
+
g.value ? (_(), K(d(mo), { key: 0 }, {
|
|
976
|
+
default: P(() => [
|
|
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 ? (
|
|
986
|
-
default:
|
|
987
|
-
|
|
982
|
+
G("ul", Oo, [
|
|
983
|
+
C(N.$slots, "summary", {}, () => [
|
|
984
|
+
b.value ? (_(), K(d(_o), { key: 0 }, ce({
|
|
985
|
+
default: P(() => [
|
|
986
|
+
pe(ae(O.value.label) + " ", 1)
|
|
988
987
|
]),
|
|
989
988
|
_: 2
|
|
990
989
|
}, [
|
|
991
990
|
O.value.value ? {
|
|
992
991
|
name: "value",
|
|
993
|
-
fn:
|
|
994
|
-
|
|
992
|
+
fn: P(() => [
|
|
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
|
-
label:
|
|
1007
|
-
|
|
1005
|
+
label: P(() => [
|
|
1006
|
+
pe(ae(D.label), 1)
|
|
1008
1007
|
]),
|
|
1009
|
-
value:
|
|
1010
|
-
|
|
1008
|
+
value: P(() => [
|
|
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 xe = (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 xe = (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 xe = (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 xe = (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 xe = (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,177 +1414,179 @@ 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 =
|
|
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(
|
|
1450
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 && (
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1518
|
+
const A = r.value;
|
|
1519
|
+
if (h.value.withHover !== !1 && (r.value = L), h.value.withTooltip !== !1) {
|
|
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];
|
|
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 (
|
|
1531
|
-
|
|
1528
|
+
function pt(L) {
|
|
1529
|
+
if (!u.value.some(
|
|
1530
|
+
({ values: I }) => L <= I.length - 1
|
|
1531
|
+
)) {
|
|
1532
|
+
ge(ve.InvalidHoveredIndex);
|
|
1532
1533
|
return;
|
|
1533
1534
|
}
|
|
1534
|
-
|
|
1535
|
+
Se(L);
|
|
1535
1536
|
}
|
|
1536
|
-
function
|
|
1537
|
+
function un() {
|
|
1537
1538
|
setTimeout(() => {
|
|
1538
|
-
|
|
1539
|
+
ln.value && mt(), a("chart-mouseleave");
|
|
1539
1540
|
}, 0);
|
|
1540
1541
|
}
|
|
1541
|
-
function pt({ index: L, value: A, event: I }) {
|
|
1542
|
-
L !== null && Re(L), a("axis-mouseenter", { index: L, value: A, event: I });
|
|
1543
|
-
}
|
|
1544
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 }) {
|
|
1545
1546
|
a("axis-click", { index: L, value: A, event: I });
|
|
1546
1547
|
}
|
|
1547
|
-
return
|
|
1548
|
-
|
|
1548
|
+
return Y(
|
|
1549
|
+
u,
|
|
1549
1550
|
(L, A) => a("data-changed", { newValue: L, oldValue: A })
|
|
1550
|
-
),
|
|
1551
|
+
), Y(
|
|
1551
1552
|
l,
|
|
1552
1553
|
(L, A) => a("labels-changed", { newValue: L, oldValue: A })
|
|
1553
|
-
),
|
|
1554
|
+
), Y(B, (L) => L && ge(ve.Empty), { immediate: !0 }), Y(() => t.hoveredIndex, pt), Y(
|
|
1554
1555
|
m,
|
|
1555
1556
|
(L) => {
|
|
1556
|
-
L && t.hoveredIndex != null &&
|
|
1557
|
+
L && t.hoveredIndex != null && r.value === -1 && pt(t.hoveredIndex);
|
|
1557
1558
|
},
|
|
1558
1559
|
{ flush: "post" }
|
|
1559
|
-
),
|
|
1560
|
-
L === !1 &&
|
|
1561
|
-
}),
|
|
1560
|
+
), Y(T, (L) => {
|
|
1561
|
+
L === !1 && be.opened && mt();
|
|
1562
|
+
}), _e(async () => {
|
|
1562
1563
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1563
|
-
}), Fe("chartID",
|
|
1564
|
-
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)}`,
|
|
1565
1566
|
ref_key: "chartContainer",
|
|
1566
1567
|
ref: g,
|
|
1567
|
-
margins:
|
|
1568
|
-
"container-size": d(
|
|
1568
|
+
margins: ne.value,
|
|
1569
|
+
"container-size": d(N),
|
|
1569
1570
|
"no-min-size": d(h).noMinSize,
|
|
1570
1571
|
"transparent-background": d(h).transparentBackground,
|
|
1571
1572
|
"data-j-lume-chart": "",
|
|
1572
|
-
onResize: d(
|
|
1573
|
+
onResize: d(E),
|
|
1573
1574
|
onClick: A[24] || (A[24] = (I) => a("chart-click", I)),
|
|
1574
1575
|
onMouseenter: A[25] || (A[25] = (I) => a("chart-mouseenter", I)),
|
|
1575
|
-
onMouseleave:
|
|
1576
|
+
onMouseleave: un
|
|
1576
1577
|
}, {
|
|
1577
|
-
header:
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
L.title ? (
|
|
1581
|
-
|
|
1582
|
-
|
|
1578
|
+
header: P(() => [
|
|
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)
|
|
1583
1584
|
])
|
|
1584
1585
|
]),
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
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), {
|
|
1589
1590
|
key: 0,
|
|
1590
1591
|
data: d($),
|
|
1591
1592
|
class: "lume-chart__legend",
|
|
@@ -1598,9 +1599,9 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1598
1599
|
])
|
|
1599
1600
|
])
|
|
1600
1601
|
]),
|
|
1601
|
-
footer:
|
|
1602
|
-
|
|
1603
|
-
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (
|
|
1602
|
+
footer: P(() => [
|
|
1603
|
+
M.value ? (_(), x("h3", ca, ae(ke.value), 1)) : z("", !0),
|
|
1604
|
+
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (_(), K(d(bt), {
|
|
1604
1605
|
key: 1,
|
|
1605
1606
|
data: d($),
|
|
1606
1607
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
@@ -1610,118 +1611,118 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1610
1611
|
onMouseleave: A[18] || (A[18] = (I) => a("legend-mouseleave"))
|
|
1611
1612
|
}, null, 8, ["data"])) : z("", !0)
|
|
1612
1613
|
]),
|
|
1613
|
-
extra:
|
|
1614
|
-
|
|
1614
|
+
extra: P(() => [
|
|
1615
|
+
C(L.$slots, "tooltip", j(d(be), {
|
|
1615
1616
|
data: d($),
|
|
1616
1617
|
labels: d(w),
|
|
1617
|
-
title: d(w)[
|
|
1618
|
-
items: d(
|
|
1619
|
-
position:
|
|
1618
|
+
title: d(w)[r.value],
|
|
1619
|
+
items: d(dt)(r.value),
|
|
1620
|
+
position: vt.value,
|
|
1620
1621
|
withTooltip: d(h).withTooltip !== !1,
|
|
1621
|
-
hoveredIndex:
|
|
1622
|
+
hoveredIndex: r.value,
|
|
1622
1623
|
handleMouseEnter: () => T.value = !0,
|
|
1623
1624
|
handleMouseLeave: () => T.value = !1,
|
|
1624
1625
|
options: d(h).tooltipOptions
|
|
1625
1626
|
}), () => [
|
|
1626
|
-
|
|
1627
|
-
position:
|
|
1628
|
-
title: d(w)[
|
|
1629
|
-
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),
|
|
1630
1631
|
options: d(h).tooltipOptions,
|
|
1631
1632
|
"data-j-lume-chart__tooltip": "",
|
|
1632
1633
|
onOpened: A[19] || (A[19] = (I) => a("tooltip-opened", {
|
|
1633
|
-
index:
|
|
1634
|
+
index: r.value,
|
|
1634
1635
|
targetElement: I
|
|
1635
1636
|
})),
|
|
1636
1637
|
onMoved: A[20] || (A[20] = (I) => a("tooltip-moved", {
|
|
1637
|
-
index:
|
|
1638
|
+
index: r.value,
|
|
1638
1639
|
targetElement: I
|
|
1639
1640
|
})),
|
|
1640
1641
|
onClosed: A[21] || (A[21] = (I) => a("tooltip-closed")),
|
|
1641
1642
|
onTooltipMouseenter: A[22] || (A[22] = (I) => T.value = !0),
|
|
1642
1643
|
onTooltipMouseleave: A[23] || (A[23] = (I) => T.value = !1)
|
|
1643
1644
|
}), {
|
|
1644
|
-
default:
|
|
1645
|
-
|
|
1645
|
+
default: P(() => [
|
|
1646
|
+
C(L.$slots, "tooltip-content", {
|
|
1646
1647
|
data: d($),
|
|
1647
1648
|
labels: d(w),
|
|
1648
|
-
hoveredIndex:
|
|
1649
|
+
hoveredIndex: r.value
|
|
1649
1650
|
}, void 0, !0)
|
|
1650
1651
|
]),
|
|
1651
1652
|
_: 3
|
|
1652
1653
|
}, 16, ["position", "title", "items", "options"])) : z("", !0)
|
|
1653
1654
|
], !0)
|
|
1654
1655
|
]),
|
|
1655
|
-
default:
|
|
1656
|
-
|
|
1657
|
-
d(
|
|
1656
|
+
default: P(() => [
|
|
1657
|
+
y.value ? (_(), x(q, { key: 0 }, [
|
|
1658
|
+
d(X) ? (_(), K(d(ut), j({ key: 0 }, d(J), {
|
|
1658
1659
|
"class-list": "lume-fill--negative",
|
|
1659
1660
|
transition: !1,
|
|
1660
1661
|
"data-j-lume-chart__negative-values": ""
|
|
1661
1662
|
}), null, 16)) : z("", !0),
|
|
1662
|
-
d(h).withAxes !== !1 ?
|
|
1663
|
+
d(h).withAxes !== !1 ? C(L.$slots, "axes", {
|
|
1663
1664
|
key: 1,
|
|
1664
1665
|
xScale: F.value,
|
|
1665
|
-
yScale:
|
|
1666
|
-
containerSize: d(
|
|
1666
|
+
yScale: Q.value,
|
|
1667
|
+
containerSize: d(N),
|
|
1667
1668
|
options: d(h),
|
|
1668
|
-
hoveredIndex:
|
|
1669
|
+
hoveredIndex: r.value
|
|
1669
1670
|
}, () => [
|
|
1670
|
-
re(d(
|
|
1671
|
+
re(d(kt), {
|
|
1671
1672
|
type: "x",
|
|
1672
1673
|
scale: F.value,
|
|
1673
|
-
"container-size": d(
|
|
1674
|
-
options:
|
|
1675
|
-
"hovered-index":
|
|
1674
|
+
"container-size": d(N),
|
|
1675
|
+
options: Oe.value,
|
|
1676
|
+
"hovered-index": r.value,
|
|
1676
1677
|
orientation: d(c),
|
|
1677
1678
|
"data-j-lume-chart__x-axis": "",
|
|
1678
|
-
onClick:
|
|
1679
|
-
onMouseenter:
|
|
1679
|
+
onClick: ht,
|
|
1680
|
+
onMouseenter: ft,
|
|
1680
1681
|
onMouseleave: A[3] || (A[3] = (I) => a("axis-mouseleave")),
|
|
1681
1682
|
"onLume__internal-AxisSize": A[4] || (A[4] = (I) => O.value = I)
|
|
1682
1683
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1683
|
-
re(d(
|
|
1684
|
+
re(d(kt), {
|
|
1684
1685
|
type: "y",
|
|
1685
|
-
scale:
|
|
1686
|
-
"container-size": d(
|
|
1687
|
-
options:
|
|
1688
|
-
"hovered-index":
|
|
1686
|
+
scale: Q.value,
|
|
1687
|
+
"container-size": d(N),
|
|
1688
|
+
options: xe.value,
|
|
1689
|
+
"hovered-index": r.value,
|
|
1689
1690
|
orientation: d(c),
|
|
1690
1691
|
"data-j-lume-chart__y-axis": "",
|
|
1691
|
-
onClick:
|
|
1692
|
-
onMouseenter:
|
|
1692
|
+
onClick: ht,
|
|
1693
|
+
onMouseenter: ft,
|
|
1693
1694
|
onMouseleave: A[5] || (A[5] = (I) => a("axis-mouseleave")),
|
|
1694
1695
|
"onLume__internal-AxisSize": A[6] || (A[6] = (I) => b.value = I)
|
|
1695
1696
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1696
1697
|
], !0) : z("", !0),
|
|
1697
|
-
d(h).withHover !== !1 ? (
|
|
1698
|
+
d(h).withHover !== !1 ? (_(), K(d(Wo), {
|
|
1698
1699
|
key: 2,
|
|
1699
1700
|
data: d($),
|
|
1700
1701
|
orientation: d(c),
|
|
1701
1702
|
"x-scale": F.value,
|
|
1702
|
-
"y-scale":
|
|
1703
|
+
"y-scale": Q.value,
|
|
1703
1704
|
"data-j-lume-chart__overlay-group": "",
|
|
1704
|
-
"onLume__internal-Hover":
|
|
1705
|
+
"onLume__internal-Hover": Se
|
|
1705
1706
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
|
|
1706
|
-
d(
|
|
1707
|
-
(
|
|
1707
|
+
d(se) ? (_(), x("g", ia, [
|
|
1708
|
+
(_(!0), x(q, null, W(m.value, (I, Pe) => (_(), x("circle", j(I, {
|
|
1708
1709
|
ref_for: !0,
|
|
1709
1710
|
ref_key: "tooltipAnchor",
|
|
1710
1711
|
ref: f,
|
|
1711
|
-
key: `anchor_${
|
|
1712
|
-
r: d(
|
|
1712
|
+
key: `anchor_${Pe}`,
|
|
1713
|
+
r: d(Gn),
|
|
1713
1714
|
class: "lume-fill--transparent"
|
|
1714
|
-
}), null, 16,
|
|
1715
|
+
}), null, 16, sa))), 128))
|
|
1715
1716
|
])) : z("", !0),
|
|
1716
|
-
|
|
1717
|
+
C(L.$slots, "groups", {
|
|
1717
1718
|
data: d($),
|
|
1718
1719
|
labels: d(w),
|
|
1719
1720
|
options: d(h),
|
|
1720
1721
|
orientation: d(c),
|
|
1721
1722
|
xScale: F.value,
|
|
1722
|
-
yScale:
|
|
1723
|
-
hoveredIndex:
|
|
1724
|
-
containerSize: d(
|
|
1723
|
+
yScale: Q.value,
|
|
1724
|
+
hoveredIndex: r.value,
|
|
1725
|
+
containerSize: d(N),
|
|
1725
1726
|
transition: d(h).withTransition !== !1,
|
|
1726
1727
|
classList: L.classList,
|
|
1727
1728
|
onNodeClick: A[7] || (A[7] = (I) => a("node-click", I)),
|
|
@@ -1733,7 +1734,7 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1733
1734
|
onBarClick: A[13] || (A[13] = (I) => a("bar-click", I)),
|
|
1734
1735
|
onLineClick: A[14] || (A[14] = (I) => a("line-click", I)),
|
|
1735
1736
|
onPointClick: A[15] || (A[15] = (I) => a("point-click", I)),
|
|
1736
|
-
"onLume__internal-Hover":
|
|
1737
|
+
"onLume__internal-Hover": Se
|
|
1737
1738
|
}, void 0, !0)
|
|
1738
1739
|
], 64)) : z("", !0)
|
|
1739
1740
|
]),
|
|
@@ -1741,36 +1742,72 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1741
1742
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1742
1743
|
}
|
|
1743
1744
|
});
|
|
1744
|
-
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({
|
|
1745
1746
|
__name: "lume-alluvial-node-label",
|
|
1746
1747
|
props: {
|
|
1747
|
-
bottom: { type: Boolean, default: !1 }
|
|
1748
|
+
bottom: { type: Boolean, default: !1 },
|
|
1749
|
+
left: { type: Boolean, default: !1 },
|
|
1750
|
+
maxWidth: { type: Number, default: 0 }
|
|
1748
1751
|
},
|
|
1749
|
-
|
|
1750
|
-
|
|
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,
|
|
1751
1786
|
class: "lume-alluvial-group__node-label",
|
|
1752
|
-
dy: e.bottom ? "
|
|
1787
|
+
dy: e.bottom ? ".2em" : "-.2em",
|
|
1788
|
+
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1753
1789
|
}, [
|
|
1754
|
-
|
|
1755
|
-
], 8,
|
|
1790
|
+
C(i.$slots, "default", {}, void 0, !0)
|
|
1791
|
+
], 8, pa));
|
|
1756
1792
|
}
|
|
1757
1793
|
});
|
|
1758
|
-
const
|
|
1794
|
+
const _a = /* @__PURE__ */ ee(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y", "dominant-baseline"], ka = /* @__PURE__ */ Z({
|
|
1759
1795
|
__name: "lume-alluvial-node-value",
|
|
1760
1796
|
props: {
|
|
1761
1797
|
bottom: { type: Boolean, default: !0 }
|
|
1762
1798
|
},
|
|
1763
1799
|
setup(e) {
|
|
1764
|
-
return (n, t) => (
|
|
1800
|
+
return (n, t) => (_(), x("text", {
|
|
1765
1801
|
class: "lume-alluvial-group__node-value",
|
|
1766
|
-
|
|
1802
|
+
y: e.bottom ? ".2em" : "-.2em",
|
|
1803
|
+
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1767
1804
|
}, [
|
|
1768
|
-
|
|
1769
|
-
], 8,
|
|
1805
|
+
C(n.$slots, "default", {}, void 0, !0)
|
|
1806
|
+
], 8, ya));
|
|
1770
1807
|
}
|
|
1771
1808
|
});
|
|
1772
|
-
const
|
|
1773
|
-
function
|
|
1809
|
+
const ba = /* @__PURE__ */ ee(ka, [["__scopeId", "data-v-b4fc758b"]]);
|
|
1810
|
+
function Nt(e, n) {
|
|
1774
1811
|
return {
|
|
1775
1812
|
x0: 0 + (n ? n.left : 0),
|
|
1776
1813
|
y0: 0 + (n ? n.top : 0),
|
|
@@ -1778,87 +1815,87 @@ function xt(e, n) {
|
|
|
1778
1815
|
y1: e.height - (n ? n.bottom : 0)
|
|
1779
1816
|
};
|
|
1780
1817
|
}
|
|
1781
|
-
function
|
|
1782
|
-
const n = R(
|
|
1818
|
+
function Aa(e) {
|
|
1819
|
+
const n = R(Nt(e));
|
|
1783
1820
|
function t(o) {
|
|
1784
|
-
n.value =
|
|
1821
|
+
n.value = Nt(e, o);
|
|
1785
1822
|
}
|
|
1786
1823
|
return { extents: n, updateExtents: t };
|
|
1787
1824
|
}
|
|
1788
|
-
var
|
|
1789
|
-
const
|
|
1790
|
-
function
|
|
1791
|
-
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);
|
|
1792
1829
|
}
|
|
1793
|
-
const
|
|
1830
|
+
const Oa = 200;
|
|
1794
1831
|
function $e(e) {
|
|
1795
1832
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1796
1833
|
}
|
|
1797
|
-
function
|
|
1834
|
+
function xa(e, n) {
|
|
1798
1835
|
return n.nodes.find((t) => t.id === e);
|
|
1799
1836
|
}
|
|
1800
|
-
function
|
|
1837
|
+
function $a(e, n) {
|
|
1801
1838
|
return n.links.find((t) => t.id === e);
|
|
1802
1839
|
}
|
|
1803
|
-
function
|
|
1840
|
+
function qt(e) {
|
|
1804
1841
|
return !!(e.sourceLinks && e.targetLinks);
|
|
1805
1842
|
}
|
|
1806
|
-
function
|
|
1843
|
+
function Ia(e, n) {
|
|
1807
1844
|
if (!n)
|
|
1808
1845
|
return;
|
|
1809
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(
|
|
1810
1847
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1811
1848
|
-1 / 0
|
|
1812
|
-
),
|
|
1849
|
+
), u = n.filter((l) => o.includes(l.dataset.id)).reduce(
|
|
1813
1850
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1814
1851
|
-1 / 0
|
|
1815
1852
|
);
|
|
1816
1853
|
return {
|
|
1817
1854
|
left: a,
|
|
1818
1855
|
top: 0,
|
|
1819
|
-
right:
|
|
1856
|
+
right: u,
|
|
1820
1857
|
bottom: 0
|
|
1821
1858
|
};
|
|
1822
1859
|
}
|
|
1823
|
-
function
|
|
1860
|
+
function wa(e) {
|
|
1824
1861
|
return e.map((n) => {
|
|
1825
|
-
const t = n.y1 - n.y0 <
|
|
1862
|
+
const t = n.y1 - n.y0 < We;
|
|
1826
1863
|
return {
|
|
1827
1864
|
x: n.x0,
|
|
1828
|
-
y: n.y0 - (t ?
|
|
1865
|
+
y: n.y0 - (t ? We / 2 : 0),
|
|
1829
1866
|
// Negative offset to account for the min. height
|
|
1830
1867
|
width: n.x1 - n.x0,
|
|
1831
|
-
height: t ?
|
|
1868
|
+
height: t ? We : n.y1 - n.y0,
|
|
1832
1869
|
textTransform: {
|
|
1833
|
-
x: n.depth > 0 ? n.x1 +
|
|
1870
|
+
x: n.depth > 0 ? n.x1 + wt : n.x0 - wt,
|
|
1834
1871
|
y: (n.y1 + n.y0) / 2
|
|
1835
1872
|
},
|
|
1836
1873
|
node: n
|
|
1837
1874
|
};
|
|
1838
1875
|
});
|
|
1839
1876
|
}
|
|
1840
|
-
function
|
|
1877
|
+
function Ea(e) {
|
|
1841
1878
|
return [e.source.x1, e.y0];
|
|
1842
1879
|
}
|
|
1843
|
-
function
|
|
1880
|
+
function Na(e) {
|
|
1844
1881
|
return [e.target.x0, e.y1];
|
|
1845
1882
|
}
|
|
1846
|
-
function
|
|
1847
|
-
return e.curveFunction ?
|
|
1883
|
+
function Da(e) {
|
|
1884
|
+
return e.curveFunction ? fn(e.curveFunction).source(Ea).target(Na) : yn();
|
|
1848
1885
|
}
|
|
1849
|
-
function
|
|
1886
|
+
function Ha(e) {
|
|
1850
1887
|
return e.map((n) => {
|
|
1851
1888
|
var t;
|
|
1852
1889
|
return {
|
|
1853
1890
|
id: n.id,
|
|
1854
1891
|
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Be,
|
|
1855
|
-
d:
|
|
1892
|
+
d: Da(n)(n),
|
|
1856
1893
|
strokeWidth: Math.max(1, n.width),
|
|
1857
1894
|
link: n
|
|
1858
1895
|
};
|
|
1859
1896
|
});
|
|
1860
1897
|
}
|
|
1861
|
-
function
|
|
1898
|
+
function Dt(e, n, t, o, a) {
|
|
1862
1899
|
if (o === !1) {
|
|
1863
1900
|
e.node = {
|
|
1864
1901
|
...e.node,
|
|
@@ -1866,8 +1903,8 @@ function wt(e, n, t, o, a) {
|
|
|
1866
1903
|
};
|
|
1867
1904
|
return;
|
|
1868
1905
|
}
|
|
1869
|
-
const
|
|
1870
|
-
let c = (Date.now() -
|
|
1906
|
+
const u = Date.now(), l = Nn(n, t), i = () => {
|
|
1907
|
+
let c = (Date.now() - u) / Oa;
|
|
1871
1908
|
c > 1 && (c = 1), e.node = {
|
|
1872
1909
|
...e.node,
|
|
1873
1910
|
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
@@ -1875,17 +1912,17 @@ function wt(e, n, t, o, a) {
|
|
|
1875
1912
|
};
|
|
1876
1913
|
requestAnimationFrame(i);
|
|
1877
1914
|
}
|
|
1878
|
-
const
|
|
1915
|
+
const Ma = {
|
|
1879
1916
|
nodes: [],
|
|
1880
1917
|
links: []
|
|
1881
1918
|
};
|
|
1882
|
-
function
|
|
1919
|
+
function Ht(e, n) {
|
|
1883
1920
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1884
1921
|
}
|
|
1885
|
-
function
|
|
1922
|
+
function Ba(e, n, t) {
|
|
1886
1923
|
const o = R(null), a = v(() => {
|
|
1887
|
-
var
|
|
1888
|
-
return (
|
|
1924
|
+
var r;
|
|
1925
|
+
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1889
1926
|
({ label: f, color: g, value: m, deriveColorFromIncomingLinks: T, offset: O }) => ({
|
|
1890
1927
|
label: f || m.toString(),
|
|
1891
1928
|
color: g,
|
|
@@ -1895,10 +1932,10 @@ function Na(e, n, t) {
|
|
|
1895
1932
|
offset: O
|
|
1896
1933
|
})
|
|
1897
1934
|
);
|
|
1898
|
-
}),
|
|
1935
|
+
}), u = v(
|
|
1899
1936
|
() => {
|
|
1900
|
-
var
|
|
1901
|
-
return (
|
|
1937
|
+
var r;
|
|
1938
|
+
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1902
1939
|
(f) => {
|
|
1903
1940
|
var g;
|
|
1904
1941
|
return (g = f.targets) == null ? void 0 : g.map(
|
|
@@ -1914,43 +1951,43 @@ function Na(e, n, t) {
|
|
|
1914
1951
|
}
|
|
1915
1952
|
).filter(Boolean).flat();
|
|
1916
1953
|
}
|
|
1917
|
-
), l = v(() =>
|
|
1918
|
-
var
|
|
1919
|
-
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(
|
|
1920
1957
|
(f, g) => {
|
|
1921
|
-
const m =
|
|
1958
|
+
const m = Ht(g, f);
|
|
1922
1959
|
return m ? (m.push(g), m.sort((T, O) => (T._y0 || T.y0) - (O._y0 || O.y0))) : f.push([g]), f;
|
|
1923
1960
|
},
|
|
1924
1961
|
[]
|
|
1925
1962
|
);
|
|
1926
1963
|
});
|
|
1927
|
-
function s(
|
|
1928
|
-
const { offset: f } =
|
|
1964
|
+
function s(r) {
|
|
1965
|
+
const { offset: f } = r, g = Ht(r, i.value);
|
|
1929
1966
|
if (!g)
|
|
1930
1967
|
return;
|
|
1931
|
-
const m = g[g.findIndex((O) => O.id ===
|
|
1932
|
-
|
|
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);
|
|
1933
1970
|
}
|
|
1934
|
-
function c(
|
|
1935
|
-
const { id: g, _y0: m, y0: T } =
|
|
1971
|
+
function c(r, f) {
|
|
1972
|
+
const { id: g, _y0: m, y0: T } = r, O = f.links.filter(
|
|
1936
1973
|
($) => $.source.id === g
|
|
1937
1974
|
), b = f.links.filter(
|
|
1938
1975
|
($) => $.target.id === g
|
|
1939
1976
|
), h = T - m;
|
|
1940
1977
|
O.forEach(($) => $.y0 += h), b.forEach(($) => $.y1 += h);
|
|
1941
1978
|
}
|
|
1942
|
-
const p = v(() => (o.value && a.value.forEach((
|
|
1943
|
-
|
|
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));
|
|
1944
1981
|
}), o.value));
|
|
1945
|
-
return
|
|
1982
|
+
return Y([l, t], () => {
|
|
1946
1983
|
try {
|
|
1947
|
-
const { x0:
|
|
1984
|
+
const { x0: r, y0: f, x1: g, y1: m } = t.value;
|
|
1948
1985
|
o.value = l.value.extent([
|
|
1949
|
-
[
|
|
1986
|
+
[r, f],
|
|
1950
1987
|
[g, m]
|
|
1951
|
-
])({ nodes: a.value, links:
|
|
1952
|
-
} catch (
|
|
1953
|
-
|
|
1988
|
+
])({ nodes: a.value, links: u.value });
|
|
1989
|
+
} catch (r) {
|
|
1990
|
+
La(Qt.GraphProblem, r), o.value = Ma;
|
|
1954
1991
|
}
|
|
1955
1992
|
}), { columns: i, graph: p };
|
|
1956
1993
|
}
|
|
@@ -1970,12 +2007,12 @@ function tt(e, n) {
|
|
|
1970
2007
|
);
|
|
1971
2008
|
}), n;
|
|
1972
2009
|
}
|
|
1973
|
-
function
|
|
2010
|
+
function Ra(e, n) {
|
|
1974
2011
|
return n.links.reduce((t, o) => (o.source.id in e && o.target.id in e && t.push(o.id), t), []);
|
|
1975
2012
|
}
|
|
1976
|
-
const
|
|
2013
|
+
const Sa = (e, n) => {
|
|
1977
2014
|
let t;
|
|
1978
|
-
|
|
2015
|
+
qt(e) ? t = {
|
|
1979
2016
|
[e.id]: e.value,
|
|
1980
2017
|
...et(e),
|
|
1981
2018
|
...tt(e)
|
|
@@ -1985,14 +2022,14 @@ const Ha = (e, n) => {
|
|
|
1985
2022
|
...et(e.source),
|
|
1986
2023
|
...tt(e.target)
|
|
1987
2024
|
};
|
|
1988
|
-
const o =
|
|
2025
|
+
const o = Ra(t, n);
|
|
1989
2026
|
return { nodes: t, links: o };
|
|
1990
|
-
},
|
|
1991
|
-
if (
|
|
2027
|
+
}, Ca = (e) => {
|
|
2028
|
+
if (qt(e)) {
|
|
1992
2029
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
1993
2030
|
return {
|
|
1994
2031
|
nodes: n.reduce(
|
|
1995
|
-
(t, { source: o, target: a, value:
|
|
2032
|
+
(t, { source: o, target: a, value: u }) => o === e ? { ...t, [$e(a)]: u } : { ...t, [$e(o)]: u },
|
|
1996
2033
|
{ [$e(e)]: e.value }
|
|
1997
2034
|
),
|
|
1998
2035
|
links: n.map(({ id: t }) => t)
|
|
@@ -2006,15 +2043,15 @@ const Ha = (e, n) => {
|
|
|
2006
2043
|
links: [e.id]
|
|
2007
2044
|
};
|
|
2008
2045
|
};
|
|
2009
|
-
function
|
|
2046
|
+
function Ga(e, n, t) {
|
|
2010
2047
|
const o = R(null), a = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2011
2048
|
o.value,
|
|
2012
2049
|
t.value
|
|
2013
|
-
) : n.value.highlightedElements === "closest" ?
|
|
2014
|
-
return
|
|
2015
|
-
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) {
|
|
2016
2053
|
e.value.forEach((i) => {
|
|
2017
|
-
i.node.id in l.nodes &&
|
|
2054
|
+
i.node.id in l.nodes && Dt(
|
|
2018
2055
|
i,
|
|
2019
2056
|
l.nodes[i.node.id],
|
|
2020
2057
|
i.node.value,
|
|
@@ -2025,22 +2062,22 @@ function Ma(e, n, t) {
|
|
|
2025
2062
|
return;
|
|
2026
2063
|
}
|
|
2027
2064
|
e.value.forEach((i) => {
|
|
2028
|
-
i.node.id in
|
|
2065
|
+
i.node.id in u.nodes && Dt(
|
|
2029
2066
|
i,
|
|
2030
2067
|
i.node.value,
|
|
2031
|
-
|
|
2068
|
+
u.nodes[i.node.id],
|
|
2032
2069
|
n.value.withTransition
|
|
2033
2070
|
);
|
|
2034
2071
|
});
|
|
2035
2072
|
}), { highlightedElements: a, hoveredElement: o };
|
|
2036
2073
|
}
|
|
2037
|
-
const
|
|
2074
|
+
const ja = {
|
|
2038
2075
|
class: "lume-alluvial-group",
|
|
2039
2076
|
"data-j-alluvial-group": ""
|
|
2040
|
-
},
|
|
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({
|
|
2041
2078
|
__name: "lume-alluvial-group",
|
|
2042
2079
|
props: {
|
|
2043
|
-
...
|
|
2080
|
+
...Ve(),
|
|
2044
2081
|
hoveredElementId: {
|
|
2045
2082
|
type: [Number, String],
|
|
2046
2083
|
default: null
|
|
@@ -2048,236 +2085,241 @@ const Ra = {
|
|
|
2048
2085
|
},
|
|
2049
2086
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2050
2087
|
setup(e, { emit: n }) {
|
|
2051
|
-
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(
|
|
2052
2089
|
i,
|
|
2053
2090
|
l,
|
|
2054
2091
|
g
|
|
2055
|
-
), O = v(() =>
|
|
2092
|
+
), O = v(() => Ce(l.value.valueFormat)), b = v(
|
|
2056
2093
|
() => Object.keys(T.value.nodes)
|
|
2057
2094
|
), h = v(() => f.value ? f.value.map(
|
|
2058
2095
|
(k) => k[0].x0 + l.value.nodeWidth / 2
|
|
2059
2096
|
) : []), $ = v(() => {
|
|
2060
2097
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2061
|
-
return l.value.nodeHeaders.slice(0, h.value.length).map((k,
|
|
2098
|
+
return l.value.nodeHeaders.slice(0, h.value.length).map((k, B) => ({
|
|
2062
2099
|
label: k,
|
|
2063
|
-
x: h.value[
|
|
2100
|
+
x: h.value[B]
|
|
2064
2101
|
}));
|
|
2065
2102
|
}), w = v(
|
|
2066
|
-
() => l.value.nodeHeaderPadding ??
|
|
2067
|
-
),
|
|
2103
|
+
() => l.value.nodeHeaderPadding ?? ma
|
|
2104
|
+
), N = v(() => {
|
|
2068
2105
|
if (!(!l.value.gradient || !g.value))
|
|
2069
|
-
return g.value.links.reduce((k,
|
|
2070
|
-
const { source:
|
|
2071
|
-
return k[
|
|
2072
|
-
source:
|
|
2073
|
-
target:
|
|
2074
|
-
x1:
|
|
2075
|
-
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
|
|
2076
2113
|
}, k;
|
|
2077
2114
|
}, {});
|
|
2078
|
-
}),
|
|
2115
|
+
}), E = v(() => {
|
|
2079
2116
|
const k = i.value.filter(
|
|
2080
|
-
(
|
|
2081
|
-
),
|
|
2082
|
-
return k.forEach((
|
|
2083
|
-
const
|
|
2084
|
-
s.value.filter(({ link:
|
|
2085
|
-
const
|
|
2086
|
-
return
|
|
2087
|
-
x:
|
|
2088
|
-
y:
|
|
2089
|
-
height:
|
|
2090
|
-
width:
|
|
2091
|
-
key: `node-block-${
|
|
2092
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2093
|
-
}),
|
|
2094
|
-
}, 0),
|
|
2095
|
-
id:
|
|
2096
|
-
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
|
|
2097
2134
|
});
|
|
2098
|
-
}),
|
|
2135
|
+
}), B;
|
|
2099
2136
|
});
|
|
2100
|
-
function
|
|
2137
|
+
function D(k) {
|
|
2101
2138
|
return l.value.gradient && `url('#${a}_${k.id}')`;
|
|
2102
2139
|
}
|
|
2103
|
-
function
|
|
2140
|
+
function V(k) {
|
|
2104
2141
|
return b.value.length > 0 && !b.value.includes(k.toString());
|
|
2105
2142
|
}
|
|
2106
2143
|
function U(k) {
|
|
2107
2144
|
return b.value.length > 0 && b.value.includes(k.toString());
|
|
2108
2145
|
}
|
|
2109
|
-
function
|
|
2146
|
+
function ne(k) {
|
|
2110
2147
|
return T.value.links.length > 0 && !T.value.links.includes(k);
|
|
2111
2148
|
}
|
|
2112
2149
|
function F(k) {
|
|
2113
2150
|
return T.value.links.length > 0 && T.value.links.includes(k);
|
|
2114
2151
|
}
|
|
2115
|
-
function
|
|
2152
|
+
function Q(k) {
|
|
2116
2153
|
return !k.node.color && k.node.deriveColorFromIncomingLinks;
|
|
2117
2154
|
}
|
|
2118
|
-
function
|
|
2119
|
-
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 }));
|
|
2120
2157
|
}
|
|
2121
|
-
function
|
|
2122
|
-
const
|
|
2123
|
-
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 });
|
|
2124
2161
|
}
|
|
2125
|
-
function
|
|
2162
|
+
function ke(k) {
|
|
2126
2163
|
if (k == null) {
|
|
2127
2164
|
m.value = null;
|
|
2128
2165
|
return;
|
|
2129
2166
|
}
|
|
2130
|
-
const
|
|
2131
|
-
if (!
|
|
2132
|
-
|
|
2167
|
+
const B = xa(k, g.value) || $a(k, g.value);
|
|
2168
|
+
if (!B) {
|
|
2169
|
+
ge(ve.InvalidHoveredElement);
|
|
2133
2170
|
return;
|
|
2134
2171
|
}
|
|
2135
|
-
m.value =
|
|
2172
|
+
m.value = B;
|
|
2136
2173
|
}
|
|
2137
|
-
function
|
|
2138
|
-
var
|
|
2139
|
-
return ((
|
|
2174
|
+
function S(k) {
|
|
2175
|
+
var B;
|
|
2176
|
+
return ((B = E.value.find(({ id: y }) => k === y)) == null ? void 0 : B.subNodes) ?? [];
|
|
2140
2177
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
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,
|
|
2153
2191
|
y: -w.value,
|
|
2154
2192
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
2155
|
-
},
|
|
2193
|
+
}, ae(y.label), 9, Pa))), 128))
|
|
2156
2194
|
])) : z("", !0),
|
|
2157
|
-
|
|
2195
|
+
G("g", {
|
|
2158
2196
|
class: "lume-alluvial-link-group",
|
|
2159
|
-
onMouseleave:
|
|
2197
|
+
onMouseleave: xe
|
|
2160
2198
|
}, [
|
|
2161
|
-
d(l).gradient ? (
|
|
2162
|
-
(
|
|
2163
|
-
id: `${d(a)}_${
|
|
2164
|
-
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,
|
|
2165
2203
|
gradientUnits: "userSpaceOnUse",
|
|
2166
|
-
x1:
|
|
2167
|
-
x2:
|
|
2204
|
+
x1: y.x1,
|
|
2205
|
+
x2: y.x2
|
|
2168
2206
|
}, [
|
|
2169
|
-
|
|
2207
|
+
G("stop", {
|
|
2170
2208
|
offset: "0%",
|
|
2171
|
-
"stop-color": `var(--lume-color--${
|
|
2172
|
-
}, null, 8,
|
|
2173
|
-
|
|
2209
|
+
"stop-color": `var(--lume-color--${y.source})`
|
|
2210
|
+
}, null, 8, Wa),
|
|
2211
|
+
G("stop", {
|
|
2174
2212
|
offset: "100%",
|
|
2175
|
-
"stop-color": `var(--lume-color--${
|
|
2176
|
-
}, null, 8,
|
|
2177
|
-
], 8,
|
|
2213
|
+
"stop-color": `var(--lume-color--${y.target})`
|
|
2214
|
+
}, null, 8, Za)
|
|
2215
|
+
], 8, za))), 128))
|
|
2178
2216
|
])) : z("", !0),
|
|
2179
|
-
(
|
|
2180
|
-
key: `link-ghost_${
|
|
2181
|
-
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", [
|
|
2182
2220
|
"lume-stroke--transparent",
|
|
2183
2221
|
"lume-alluvial-group__link--ghost"
|
|
2184
2222
|
]]),
|
|
2185
|
-
d:
|
|
2186
|
-
"stroke-width":
|
|
2223
|
+
d: y.d,
|
|
2224
|
+
"stroke-width": y.strokeWidth + d(va),
|
|
2187
2225
|
"data-j-alluvial-ghost": "",
|
|
2188
|
-
onClick: (
|
|
2189
|
-
onMouseover: (
|
|
2190
|
-
}, null, 40,
|
|
2191
|
-
(
|
|
2192
|
-
key: `link_${
|
|
2193
|
-
class:
|
|
2194
|
-
[`lume-stroke--${
|
|
2195
|
-
"lume-alluvial-group__link--faded":
|
|
2196
|
-
"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)
|
|
2197
2235
|
}]),
|
|
2198
|
-
d:
|
|
2199
|
-
stroke:
|
|
2236
|
+
d: y.d,
|
|
2237
|
+
stroke: D(y.link),
|
|
2200
2238
|
"stroke-dasharray": k.containerSize.width,
|
|
2201
2239
|
"stroke-dashoffset": k.containerSize.width,
|
|
2202
|
-
"stroke-width":
|
|
2240
|
+
"stroke-width": y.strokeWidth,
|
|
2203
2241
|
"data-j-alluvial-path": "",
|
|
2204
|
-
"data-id":
|
|
2205
|
-
onClick: (
|
|
2206
|
-
onMouseover: (
|
|
2207
|
-
}, 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))
|
|
2208
2246
|
], 32),
|
|
2209
|
-
(
|
|
2210
|
-
key: `node-block_${
|
|
2211
|
-
class:
|
|
2212
|
-
"lume-alluvial-group__node--faded":
|
|
2213
|
-
"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)
|
|
2214
2252
|
}]),
|
|
2215
2253
|
"data-j-alluvial-group__node-block": ""
|
|
2216
2254
|
}, [
|
|
2217
|
-
|
|
2218
|
-
onClick: (
|
|
2219
|
-
onMouseenter: (
|
|
2220
|
-
onMouseleave: (
|
|
2221
|
-
onMouseover: (
|
|
2222
|
-
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)
|
|
2223
2261
|
}, [
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
), (
|
|
2227
|
-
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,
|
|
2228
2266
|
"data-j-alluvial-sub-nodes": ""
|
|
2229
|
-
}), null, 16))), 128)) : (
|
|
2267
|
+
}), null, 16))), 128)) : (_(), x("rect", {
|
|
2230
2268
|
key: 1,
|
|
2231
|
-
class:
|
|
2232
|
-
x:
|
|
2233
|
-
y:
|
|
2234
|
-
height:
|
|
2235
|
-
width:
|
|
2236
|
-
}, null, 10,
|
|
2237
|
-
|
|
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", {
|
|
2238
2276
|
ref_for: !0,
|
|
2239
2277
|
ref_key: "nodeTextRefs",
|
|
2240
2278
|
ref: c,
|
|
2241
|
-
class:
|
|
2242
|
-
"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
|
|
2243
2281
|
}]),
|
|
2244
|
-
transform: `translate(${
|
|
2245
|
-
"data-id":
|
|
2282
|
+
transform: `translate(${y.textTransform.x},${y.textTransform.y})`,
|
|
2283
|
+
"data-id": y.node.id,
|
|
2284
|
+
width: d(l).nodeLabelMaxWidth
|
|
2246
2285
|
}, [
|
|
2247
|
-
|
|
2248
|
-
node:
|
|
2286
|
+
C(k.$slots, `node-text-${y.node.id}`, {
|
|
2287
|
+
node: y.node,
|
|
2249
2288
|
value: O.value(
|
|
2250
|
-
|
|
2251
|
-
|
|
2289
|
+
y.node.transitionValue || y.node.value,
|
|
2290
|
+
y.node.value
|
|
2252
2291
|
)
|
|
2253
2292
|
}, () => [
|
|
2254
|
-
re(d(
|
|
2255
|
-
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
|
|
2256
2298
|
}, {
|
|
2257
|
-
default:
|
|
2258
|
-
|
|
2299
|
+
default: P(() => [
|
|
2300
|
+
pe(ae(y.node.label), 1)
|
|
2259
2301
|
]),
|
|
2260
2302
|
_: 2
|
|
2261
|
-
}, 1032, ["bottom"]),
|
|
2262
|
-
re(d(
|
|
2303
|
+
}, 1032, ["bottom", "left", "max-width"]),
|
|
2304
|
+
re(d(ba), {
|
|
2263
2305
|
bottom: !d(l).switchText
|
|
2264
2306
|
}, {
|
|
2265
|
-
default:
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2307
|
+
default: P(() => [
|
|
2308
|
+
pe(ae(O.value(
|
|
2309
|
+
y.node.transitionValue || y.node.value,
|
|
2310
|
+
y.node.value
|
|
2269
2311
|
)), 1)
|
|
2270
2312
|
]),
|
|
2271
2313
|
_: 2
|
|
2272
2314
|
}, 1032, ["bottom"])
|
|
2273
2315
|
], !0)
|
|
2274
|
-
], 10,
|
|
2275
|
-
], 40,
|
|
2316
|
+
], 10, Ja)
|
|
2317
|
+
], 40, Ya)
|
|
2276
2318
|
], 2))), 128))
|
|
2277
2319
|
]));
|
|
2278
2320
|
}
|
|
2279
2321
|
});
|
|
2280
|
-
const
|
|
2322
|
+
const qa = /* @__PURE__ */ ee(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
2281
2323
|
margins: {
|
|
2282
2324
|
top: 0,
|
|
2283
2325
|
right: 0,
|
|
@@ -2293,16 +2335,16 @@ const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
|
2293
2335
|
highlightedElements: "closest",
|
|
2294
2336
|
nodePadding: 16,
|
|
2295
2337
|
nodeWidth: 16,
|
|
2296
|
-
nodeAlign:
|
|
2338
|
+
nodeAlign: bn,
|
|
2297
2339
|
valueFormat: (e) => String(e),
|
|
2298
2340
|
iterations: 6
|
|
2299
|
-
},
|
|
2341
|
+
}, Vl = /* @__PURE__ */ Z({
|
|
2300
2342
|
__name: "lume-alluvial-diagram",
|
|
2301
2343
|
props: {
|
|
2302
|
-
...
|
|
2344
|
+
...Fo(nt)
|
|
2303
2345
|
},
|
|
2304
2346
|
setup(e, { emit: n }) {
|
|
2305
|
-
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);
|
|
2306
2348
|
function s(c) {
|
|
2307
2349
|
return {
|
|
2308
2350
|
...c,
|
|
@@ -2310,40 +2352,40 @@ const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
|
2310
2352
|
// Alluvial chart never uses base scales
|
|
2311
2353
|
};
|
|
2312
2354
|
}
|
|
2313
|
-
return (c, p) => (
|
|
2355
|
+
return (c, p) => (_(), K(d(we), j(t, {
|
|
2314
2356
|
options: s(d(i)),
|
|
2315
2357
|
"data-j-alluvial-diagram": ""
|
|
2316
|
-
},
|
|
2317
|
-
groups:
|
|
2318
|
-
re(d(
|
|
2319
|
-
|
|
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) => ({
|
|
2320
2362
|
name: g,
|
|
2321
|
-
fn:
|
|
2322
|
-
|
|
2363
|
+
fn: P((m) => [
|
|
2364
|
+
C(c.$slots, g, fe(he(m || {})))
|
|
2323
2365
|
])
|
|
2324
2366
|
}))
|
|
2325
2367
|
]), 1040, ["hovered-element-id"])
|
|
2326
2368
|
]),
|
|
2327
2369
|
_: 2
|
|
2328
2370
|
}, [
|
|
2329
|
-
|
|
2371
|
+
W(d(a), (r, f) => ({
|
|
2330
2372
|
name: f,
|
|
2331
|
-
fn:
|
|
2332
|
-
|
|
2373
|
+
fn: P((g) => [
|
|
2374
|
+
C(c.$slots, f, fe(he(g || {})))
|
|
2333
2375
|
])
|
|
2334
2376
|
}))
|
|
2335
2377
|
]), 1040, ["options"]));
|
|
2336
2378
|
}
|
|
2337
2379
|
});
|
|
2338
|
-
var
|
|
2339
|
-
const
|
|
2380
|
+
var en = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(en || {});
|
|
2381
|
+
const Pl = /* @__PURE__ */ Z({
|
|
2340
2382
|
__name: "lume-bar-chart",
|
|
2341
2383
|
props: {
|
|
2342
|
-
...
|
|
2384
|
+
...Ie(),
|
|
2343
2385
|
type: {
|
|
2344
2386
|
type: String,
|
|
2345
2387
|
default: null,
|
|
2346
|
-
validator: (e) => e in
|
|
2388
|
+
validator: (e) => e in en || e == null
|
|
2347
2389
|
}
|
|
2348
2390
|
},
|
|
2349
2391
|
setup(e, { emit: n }) {
|
|
@@ -2353,64 +2395,64 @@ const Cl = /* @__PURE__ */ W({
|
|
|
2353
2395
|
() => import("./common/abc9d23d.js")
|
|
2354
2396
|
), a = ze(
|
|
2355
2397
|
() => import("./common/0664fd4d.js")
|
|
2356
|
-
),
|
|
2398
|
+
), u = /* @__PURE__ */ new Map([
|
|
2357
2399
|
["single", t],
|
|
2358
2400
|
["grouped", o],
|
|
2359
2401
|
["stacked", a]
|
|
2360
|
-
]), l = e, { componentEventPropagator: i } =
|
|
2361
|
-
function c(
|
|
2402
|
+
]), l = e, { componentEventPropagator: i } = ye(), s = Le(ue());
|
|
2403
|
+
function c(r) {
|
|
2362
2404
|
return {
|
|
2363
|
-
...
|
|
2405
|
+
...r,
|
|
2364
2406
|
startOnZero: !0,
|
|
2365
2407
|
// Bar chart always starts on zero,
|
|
2366
2408
|
tooltipOptions: {
|
|
2367
|
-
...(
|
|
2368
|
-
position: l.orientation ===
|
|
2409
|
+
...(r == null ? void 0 : r.tooltipOptions) || {},
|
|
2410
|
+
position: l.orientation === H.HORIZONTAL ? "right" : void 0
|
|
2369
2411
|
}
|
|
2370
2412
|
};
|
|
2371
2413
|
}
|
|
2372
2414
|
const p = v(() => {
|
|
2373
2415
|
if (l.data) {
|
|
2374
2416
|
if (nt(l.data))
|
|
2375
|
-
return
|
|
2417
|
+
return u.get("single");
|
|
2376
2418
|
if (!l.type)
|
|
2377
2419
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2378
|
-
return
|
|
2420
|
+
return u.get(l.type);
|
|
2379
2421
|
}
|
|
2380
2422
|
});
|
|
2381
|
-
return (
|
|
2382
|
-
options: c(
|
|
2383
|
-
},
|
|
2384
|
-
|
|
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) => ({
|
|
2385
2427
|
name: m,
|
|
2386
|
-
fn:
|
|
2387
|
-
|
|
2428
|
+
fn: P((T) => [
|
|
2429
|
+
C(r.$slots, m, fe(he(T || {})))
|
|
2388
2430
|
])
|
|
2389
2431
|
}))
|
|
2390
2432
|
]), 1040, ["options"]));
|
|
2391
2433
|
}
|
|
2392
2434
|
});
|
|
2393
|
-
function
|
|
2394
|
-
return Object.values(
|
|
2435
|
+
function tl(e) {
|
|
2436
|
+
return Object.values(Cn).includes(e) || e == null;
|
|
2395
2437
|
}
|
|
2396
|
-
function
|
|
2397
|
-
return Object.values(
|
|
2438
|
+
function nl(e) {
|
|
2439
|
+
return Object.values(H).includes(e);
|
|
2398
2440
|
}
|
|
2399
|
-
const
|
|
2441
|
+
const ol = (e = !1) => ({
|
|
2400
2442
|
type: {
|
|
2401
2443
|
type: String,
|
|
2402
2444
|
default: null,
|
|
2403
|
-
validator:
|
|
2445
|
+
validator: tl
|
|
2404
2446
|
},
|
|
2405
2447
|
...e ? {
|
|
2406
2448
|
orientation: {
|
|
2407
2449
|
type: String,
|
|
2408
|
-
default:
|
|
2409
|
-
validator:
|
|
2450
|
+
default: H.VERTICAL,
|
|
2451
|
+
validator: nl
|
|
2410
2452
|
}
|
|
2411
2453
|
} : {}
|
|
2412
2454
|
});
|
|
2413
|
-
function
|
|
2455
|
+
function tn(e) {
|
|
2414
2456
|
const n = v(() => e.value.map((o) => ({
|
|
2415
2457
|
...o,
|
|
2416
2458
|
values: o.values.map((a) => ({
|
|
@@ -2419,43 +2461,43 @@ function Qt(e) {
|
|
|
2419
2461
|
}))
|
|
2420
2462
|
}))), t = v(() => {
|
|
2421
2463
|
var o;
|
|
2422
|
-
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) => {
|
|
2423
2465
|
a[i] ? a[i].push(l) : a[i] = [l];
|
|
2424
2466
|
}), a), []);
|
|
2425
2467
|
});
|
|
2426
2468
|
return { multiBarData: n, groupedData: t };
|
|
2427
2469
|
}
|
|
2428
|
-
function
|
|
2470
|
+
function al(e, n) {
|
|
2429
2471
|
return e.value.length === 1 ? "single" : n.value;
|
|
2430
2472
|
}
|
|
2431
|
-
function
|
|
2473
|
+
function ll(e, n, t) {
|
|
2432
2474
|
const o = v(
|
|
2433
|
-
() => t.value ===
|
|
2475
|
+
() => t.value === H.HORIZONTAL
|
|
2434
2476
|
);
|
|
2435
2477
|
function a(i) {
|
|
2436
2478
|
Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
|
|
2437
2479
|
}
|
|
2438
|
-
const
|
|
2439
|
-
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 };
|
|
2440
2482
|
}
|
|
2441
|
-
function
|
|
2483
|
+
function ul(e, n, t, o, a, u) {
|
|
2442
2484
|
const l = v(
|
|
2443
|
-
() => o.value ===
|
|
2485
|
+
() => o.value === H.HORIZONTAL
|
|
2444
2486
|
);
|
|
2445
|
-
function i(
|
|
2487
|
+
function i(r, f) {
|
|
2446
2488
|
let g, m;
|
|
2447
|
-
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 };
|
|
2448
2490
|
}
|
|
2449
|
-
function s(
|
|
2450
|
-
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();
|
|
2451
2493
|
}
|
|
2452
|
-
function c(
|
|
2453
|
-
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);
|
|
2454
2496
|
}
|
|
2455
|
-
function p(
|
|
2456
|
-
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);
|
|
2457
2499
|
return {
|
|
2458
|
-
classList: [`lume-fill--${O}`, ...
|
|
2500
|
+
classList: [`lume-fill--${O}`, ...u],
|
|
2459
2501
|
x: b,
|
|
2460
2502
|
y: h,
|
|
2461
2503
|
width: $,
|
|
@@ -2466,10 +2508,10 @@ function nl(e, n, t, o, a, r) {
|
|
|
2466
2508
|
}
|
|
2467
2509
|
return { barAttributeGenerator: p };
|
|
2468
2510
|
}
|
|
2469
|
-
function
|
|
2511
|
+
function rl(e, n, t, o, a, u) {
|
|
2470
2512
|
const l = v(
|
|
2471
|
-
() => o.value ===
|
|
2472
|
-
), 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));
|
|
2473
2515
|
function c(m, T, O) {
|
|
2474
2516
|
if (l.value)
|
|
2475
2517
|
return m >= 0 ? n.value(0) : n.value(m);
|
|
@@ -2483,47 +2525,47 @@ function ol(e, n, t, o, a, r) {
|
|
|
2483
2525
|
}
|
|
2484
2526
|
return m < 0 ? t.value(0) : t.value(m);
|
|
2485
2527
|
}
|
|
2486
|
-
function
|
|
2528
|
+
function r(m) {
|
|
2487
2529
|
return l.value ? m < 0 ? n.value(0) - n.value(m) : n.value(m) - n.value(0) : i.value.bandwidth();
|
|
2488
2530
|
}
|
|
2489
2531
|
function f(m) {
|
|
2490
2532
|
return l.value ? s.value.bandwidth() : m < 0 ? t.value(m) - t.value(0) : t.value(0) - t.value(m);
|
|
2491
2533
|
}
|
|
2492
2534
|
function g(m, T, O) {
|
|
2493
|
-
const { value: b, color: h } = m, $ = h ?? e.value[T].color ?? Object.values(
|
|
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);
|
|
2494
2536
|
return {
|
|
2495
|
-
classList: [`lume-fill--${$}`, ...
|
|
2537
|
+
classList: [`lume-fill--${$}`, ...u],
|
|
2496
2538
|
x: w,
|
|
2497
|
-
y:
|
|
2498
|
-
width:
|
|
2499
|
-
height:
|
|
2539
|
+
y: N,
|
|
2540
|
+
width: E,
|
|
2541
|
+
height: D,
|
|
2500
2542
|
isFaded: a.value !== -1 && a.value !== O,
|
|
2501
2543
|
isNegative: b < 0
|
|
2502
2544
|
};
|
|
2503
2545
|
}
|
|
2504
2546
|
return { barAttributeGenerator: g };
|
|
2505
2547
|
}
|
|
2506
|
-
function
|
|
2548
|
+
function il(e, n, t) {
|
|
2507
2549
|
const o = v(
|
|
2508
|
-
() => n.value ===
|
|
2550
|
+
() => n.value === H.HORIZONTAL
|
|
2509
2551
|
), a = v(() => {
|
|
2510
2552
|
const s = e.value.map(
|
|
2511
|
-
(c) => c.filter((p) => p.value < 0).reduce((p,
|
|
2553
|
+
(c) => c.filter((p) => p.value < 0).reduce((p, r) => p + r.value, 0)
|
|
2512
2554
|
);
|
|
2513
2555
|
return Math.min(...s);
|
|
2514
|
-
}),
|
|
2556
|
+
}), u = v(() => {
|
|
2515
2557
|
const s = e.value.map(
|
|
2516
2558
|
(c) => c.reduce(
|
|
2517
|
-
(p,
|
|
2559
|
+
(p, r) => r.value >= 0 ? p + r.value : p,
|
|
2518
2560
|
0
|
|
2519
2561
|
)
|
|
2520
2562
|
);
|
|
2521
2563
|
return Math.max(...s);
|
|
2522
2564
|
});
|
|
2523
2565
|
function l(s, c, p) {
|
|
2524
|
-
return o.value ?
|
|
2525
|
-
|
|
2526
|
-
|
|
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]),
|
|
2527
2569
|
n.value,
|
|
2528
2570
|
t.value
|
|
2529
2571
|
),
|
|
@@ -2532,32 +2574,32 @@ function al(e, n, t) {
|
|
|
2532
2574
|
}
|
|
2533
2575
|
function i(s, c, p) {
|
|
2534
2576
|
return o.value ? Object.assign(
|
|
2535
|
-
|
|
2536
|
-
|
|
2577
|
+
$t(
|
|
2578
|
+
Ee().domain(c.map((r, f) => f)).range([0, p.height]),
|
|
2537
2579
|
n.value,
|
|
2538
2580
|
t.value
|
|
2539
2581
|
),
|
|
2540
2582
|
{ labels: c }
|
|
2541
|
-
) :
|
|
2583
|
+
) : Ne().domain([u.value, a.value]).range([0, p.height]);
|
|
2542
2584
|
}
|
|
2543
2585
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2544
2586
|
}
|
|
2545
|
-
function
|
|
2587
|
+
function sl(e, n, t, o, a, u) {
|
|
2546
2588
|
const l = v(
|
|
2547
|
-
() => o.value ===
|
|
2589
|
+
() => o.value === H.HORIZONTAL
|
|
2548
2590
|
), i = v(
|
|
2549
2591
|
() => l.value ? t.value.domain() : n.value.domain()
|
|
2550
2592
|
), s = v(
|
|
2551
2593
|
() => e.value.map((b) => b.values.map((h) => h == null ? void 0 : h.value))
|
|
2552
2594
|
);
|
|
2553
2595
|
function c(b, h, $) {
|
|
2554
|
-
let w,
|
|
2555
|
-
return l.value ? (w = n.value(b >= 0 ? 0 + $ : b + $),
|
|
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 };
|
|
2556
2598
|
}
|
|
2557
2599
|
function p(b) {
|
|
2558
2600
|
return l.value ? n.value(b) - n.value(0) : n.value.bandwidth();
|
|
2559
2601
|
}
|
|
2560
|
-
function
|
|
2602
|
+
function r(b) {
|
|
2561
2603
|
return l.value ? n.value(0) - n.value(b) : n.value.bandwidth();
|
|
2562
2604
|
}
|
|
2563
2605
|
function f(b) {
|
|
@@ -2567,41 +2609,41 @@ function ll(e, n, t, o, a, r) {
|
|
|
2567
2609
|
return l.value ? t.value.bandwidth() : t.value(b) - t.value(0);
|
|
2568
2610
|
}
|
|
2569
2611
|
function m(b, h) {
|
|
2570
|
-
return b ? s.value.reduce(($, w,
|
|
2612
|
+
return b ? s.value.reduce(($, w, N) => (N < b && w[h] >= 0 && ($ += w[h]), $), 0) : 0;
|
|
2571
2613
|
}
|
|
2572
2614
|
function T(b, h) {
|
|
2573
|
-
return b ? s.value.reduce(($, w,
|
|
2615
|
+
return b ? s.value.reduce(($, w, N) => (N < b && w[h] < 0 && ($ += w[h]), $), 0) : 0;
|
|
2574
2616
|
}
|
|
2575
2617
|
function O(b, h, $) {
|
|
2576
|
-
const { value: w, color:
|
|
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);
|
|
2577
2619
|
return {
|
|
2578
|
-
classList: [`lume-fill--${
|
|
2579
|
-
width:
|
|
2580
|
-
height:
|
|
2620
|
+
classList: [`lume-fill--${N ?? e.value[h].color ?? Object.values(ie)[h]}`, ...u],
|
|
2621
|
+
width: E,
|
|
2622
|
+
height: D,
|
|
2581
2623
|
x: U,
|
|
2582
|
-
y:
|
|
2624
|
+
y: ne,
|
|
2583
2625
|
isFaded: a.value !== -1 && a.value !== $,
|
|
2584
2626
|
isNegative: w < 0
|
|
2585
2627
|
};
|
|
2586
2628
|
}
|
|
2587
2629
|
return { barAttributeGenerator: O };
|
|
2588
2630
|
}
|
|
2589
|
-
const
|
|
2631
|
+
const cl = {
|
|
2590
2632
|
class: "lume-bar-group",
|
|
2591
2633
|
"data-j-bars-group": ""
|
|
2592
|
-
},
|
|
2593
|
-
single:
|
|
2594
|
-
grouped:
|
|
2595
|
-
stacked:
|
|
2596
|
-
}, st = /* @__PURE__ */
|
|
2634
|
+
}, dl = ["onMouseenter"], vl = {
|
|
2635
|
+
single: ul,
|
|
2636
|
+
grouped: rl,
|
|
2637
|
+
stacked: sl
|
|
2638
|
+
}, st = /* @__PURE__ */ Z({
|
|
2597
2639
|
__name: "lume-bar-group",
|
|
2598
2640
|
props: {
|
|
2599
|
-
...
|
|
2641
|
+
...Ve(),
|
|
2600
2642
|
classList: {
|
|
2601
2643
|
type: [String, Array],
|
|
2602
2644
|
default: () => []
|
|
2603
2645
|
},
|
|
2604
|
-
...
|
|
2646
|
+
...ol(!0),
|
|
2605
2647
|
transition: {
|
|
2606
2648
|
type: Boolean,
|
|
2607
2649
|
default: !0
|
|
@@ -2611,188 +2653,188 @@ const rl = {
|
|
|
2611
2653
|
setup(e, { emit: n }) {
|
|
2612
2654
|
const t = e, o = n, {
|
|
2613
2655
|
data: a,
|
|
2614
|
-
hoveredIndex:
|
|
2656
|
+
hoveredIndex: u,
|
|
2615
2657
|
orientation: l,
|
|
2616
2658
|
transition: i,
|
|
2617
2659
|
type: s,
|
|
2618
2660
|
xScale: c,
|
|
2619
2661
|
yScale: p,
|
|
2620
|
-
classList:
|
|
2621
|
-
} =
|
|
2622
|
-
|
|
2623
|
-
const { emitInternalEvent: f } =
|
|
2624
|
-
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](
|
|
2625
2667
|
a,
|
|
2626
2668
|
m,
|
|
2627
2669
|
T,
|
|
2628
2670
|
l,
|
|
2629
|
-
|
|
2671
|
+
u,
|
|
2630
2672
|
O.value
|
|
2631
2673
|
);
|
|
2632
|
-
return
|
|
2674
|
+
return N;
|
|
2633
2675
|
}), h = v(() => {
|
|
2634
2676
|
if (i.value)
|
|
2635
|
-
return l.value ===
|
|
2677
|
+
return l.value === H.HORIZONTAL ? "width" : "height";
|
|
2636
2678
|
});
|
|
2637
2679
|
async function $(w) {
|
|
2638
2680
|
o("lume__internal--hover", w), f("lume__internal--hover", w);
|
|
2639
2681
|
}
|
|
2640
|
-
return (w,
|
|
2641
|
-
(
|
|
2642
|
-
key:
|
|
2643
|
-
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)
|
|
2644
2686
|
}, [
|
|
2645
|
-
(
|
|
2687
|
+
(_(!0), x(q, null, W(E, (V, U) => (_(), K(d(ut), j(b.value(V, U, D, E), {
|
|
2646
2688
|
key: `bar-${U}`,
|
|
2647
2689
|
transition: h.value,
|
|
2648
2690
|
"data-j-lume-bar": "",
|
|
2649
|
-
onClick: (
|
|
2650
|
-
index:
|
|
2691
|
+
onClick: (ne) => o("bar-click", {
|
|
2692
|
+
index: D,
|
|
2651
2693
|
datasetIndex: U,
|
|
2652
|
-
event:
|
|
2694
|
+
event: ne
|
|
2653
2695
|
})
|
|
2654
2696
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
2655
|
-
], 40,
|
|
2697
|
+
], 40, dl))), 128))
|
|
2656
2698
|
]));
|
|
2657
2699
|
}
|
|
2658
|
-
}),
|
|
2659
|
-
[
|
|
2700
|
+
}), ml = {
|
|
2701
|
+
[H.VERTICAL]: {
|
|
2660
2702
|
withTooltip: !0,
|
|
2661
2703
|
xAxisOptions: {},
|
|
2662
2704
|
yAxisOptions: { gridLines: !0 },
|
|
2663
|
-
margins:
|
|
2705
|
+
margins: Te.VERTICAL
|
|
2664
2706
|
},
|
|
2665
|
-
[
|
|
2707
|
+
[H.HORIZONTAL]: {
|
|
2666
2708
|
withTooltip: !0,
|
|
2667
2709
|
xAxisOptions: { gridLines: !0 },
|
|
2668
2710
|
yAxisOptions: { gridLines: !1 },
|
|
2669
|
-
margins:
|
|
2711
|
+
margins: Te.HORIZONTAL
|
|
2670
2712
|
}
|
|
2671
|
-
},
|
|
2713
|
+
}, Fl = /* @__PURE__ */ Z({
|
|
2672
2714
|
__name: "lume-single-bar-chart",
|
|
2673
2715
|
props: {
|
|
2674
|
-
...
|
|
2716
|
+
...Ie(nt)
|
|
2675
2717
|
},
|
|
2676
2718
|
setup(e, { emit: n }) {
|
|
2677
|
-
const t = e, { componentEventPropagator: o } =
|
|
2678
|
-
() =>
|
|
2719
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Le(ue()), { orientation: u, options: l } = te(t), i = v(
|
|
2720
|
+
() => ml[u.value || H.VERTICAL]
|
|
2679
2721
|
// needs to be computed so that default options are reactive
|
|
2680
|
-
), { allOptions: s } =
|
|
2681
|
-
return (c, p) => (
|
|
2722
|
+
), { allOptions: s } = me(l, i);
|
|
2723
|
+
return (c, p) => (_(), K(d(we), j(t, {
|
|
2682
2724
|
"chart-type": "single-bar",
|
|
2683
2725
|
options: d(s),
|
|
2684
2726
|
"data-j-single-bar-chart": ""
|
|
2685
|
-
},
|
|
2686
|
-
groups:
|
|
2687
|
-
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"])
|
|
2688
2730
|
]),
|
|
2689
2731
|
_: 2
|
|
2690
2732
|
}, [
|
|
2691
|
-
|
|
2733
|
+
W(d(a), (r, f) => ({
|
|
2692
2734
|
name: f,
|
|
2693
|
-
fn:
|
|
2694
|
-
|
|
2735
|
+
fn: P((g) => [
|
|
2736
|
+
C(c.$slots, f, fe(he(g || {})))
|
|
2695
2737
|
])
|
|
2696
2738
|
}))
|
|
2697
2739
|
]), 1040, ["options"]));
|
|
2698
2740
|
}
|
|
2699
|
-
}),
|
|
2700
|
-
[
|
|
2741
|
+
}), pl = {
|
|
2742
|
+
[H.VERTICAL]: {
|
|
2701
2743
|
withTooltip: !0,
|
|
2702
2744
|
xAxisOptions: {},
|
|
2703
2745
|
yAxisOptions: { gridLines: !0 },
|
|
2704
|
-
margins:
|
|
2746
|
+
margins: Te.VERTICAL
|
|
2705
2747
|
},
|
|
2706
|
-
[
|
|
2748
|
+
[H.HORIZONTAL]: {
|
|
2707
2749
|
withTooltip: !0,
|
|
2708
2750
|
xAxisOptions: { gridLines: !0 },
|
|
2709
2751
|
yAxisOptions: { gridLines: !1 },
|
|
2710
|
-
margins:
|
|
2752
|
+
margins: Te.HORIZONTAL,
|
|
2711
2753
|
tooltipOptions: { position: "right" }
|
|
2712
2754
|
}
|
|
2713
|
-
},
|
|
2755
|
+
}, zl = /* @__PURE__ */ Z({
|
|
2714
2756
|
__name: "lume-grouped-bar-chart",
|
|
2715
2757
|
props: {
|
|
2716
|
-
...
|
|
2758
|
+
...Ie()
|
|
2717
2759
|
},
|
|
2718
2760
|
setup(e, { emit: n }) {
|
|
2719
|
-
const t = e, { componentEventPropagator: o } =
|
|
2720
|
-
() =>
|
|
2761
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Le(ue()), { orientation: u, options: l } = te(t), i = v(
|
|
2762
|
+
() => pl[u.value || H.VERTICAL]
|
|
2721
2763
|
// needs to be computed so that default options are reactive
|
|
2722
|
-
), { allOptions: s } =
|
|
2764
|
+
), { allOptions: s } = me(
|
|
2723
2765
|
l,
|
|
2724
2766
|
i
|
|
2725
2767
|
);
|
|
2726
|
-
return (c, p) => (
|
|
2768
|
+
return (c, p) => (_(), K(d(we), j(t, {
|
|
2727
2769
|
"chart-type": "grouped-bar",
|
|
2728
2770
|
options: d(s),
|
|
2729
2771
|
"data-j-grouped-bar-chart": ""
|
|
2730
|
-
},
|
|
2731
|
-
groups:
|
|
2732
|
-
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)
|
|
2733
2775
|
]),
|
|
2734
2776
|
_: 2
|
|
2735
2777
|
}, [
|
|
2736
|
-
|
|
2778
|
+
W(d(a), (r, f) => ({
|
|
2737
2779
|
name: f,
|
|
2738
|
-
fn:
|
|
2739
|
-
|
|
2780
|
+
fn: P((g) => [
|
|
2781
|
+
C(c.$slots, f, fe(he(g || {})))
|
|
2740
2782
|
])
|
|
2741
2783
|
}))
|
|
2742
2784
|
]), 1040, ["options"]));
|
|
2743
2785
|
}
|
|
2744
|
-
}),
|
|
2745
|
-
[
|
|
2786
|
+
}), fl = {
|
|
2787
|
+
[H.VERTICAL]: {
|
|
2746
2788
|
withTooltip: !0,
|
|
2747
2789
|
xAxisOptions: {},
|
|
2748
2790
|
yAxisOptions: { gridLines: !0 },
|
|
2749
|
-
margins:
|
|
2791
|
+
margins: Te.VERTICAL
|
|
2750
2792
|
},
|
|
2751
|
-
[
|
|
2793
|
+
[H.HORIZONTAL]: {
|
|
2752
2794
|
withTooltip: !0,
|
|
2753
2795
|
xAxisOptions: { gridLines: !0 },
|
|
2754
2796
|
yAxisOptions: { gridLines: !1 },
|
|
2755
|
-
margins:
|
|
2797
|
+
margins: Te.HORIZONTAL,
|
|
2756
2798
|
tooltipOptions: { position: "right" }
|
|
2757
2799
|
}
|
|
2758
|
-
},
|
|
2800
|
+
}, Wl = /* @__PURE__ */ Z({
|
|
2759
2801
|
__name: "lume-stacked-bar-chart",
|
|
2760
2802
|
props: {
|
|
2761
|
-
...
|
|
2803
|
+
...Ie()
|
|
2762
2804
|
},
|
|
2763
2805
|
setup(e, { emit: n }) {
|
|
2764
|
-
const t = e, { componentEventPropagator: o } =
|
|
2765
|
-
() =>
|
|
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]
|
|
2766
2808
|
// needs to be computed so that default options are reactive
|
|
2767
|
-
), { allOptions: c } =
|
|
2809
|
+
), { allOptions: c } = me(
|
|
2768
2810
|
i,
|
|
2769
2811
|
s
|
|
2770
|
-
), { internalData: p } = it(
|
|
2771
|
-
|
|
2812
|
+
), { internalData: p } = it(u), { groupedData: r } = tn(p), { stackedXScaleGenerator: f, stackedYScaleGenerator: g } = il(
|
|
2813
|
+
r,
|
|
2772
2814
|
l,
|
|
2773
2815
|
i
|
|
2774
2816
|
);
|
|
2775
|
-
return (m, T) => (
|
|
2817
|
+
return (m, T) => (_(), K(d(we), j(t, {
|
|
2776
2818
|
"chart-type": "stacked-bar",
|
|
2777
2819
|
options: d(c),
|
|
2778
2820
|
"x-scale": d(f),
|
|
2779
2821
|
"y-scale": d(g),
|
|
2780
2822
|
"data-j-stacked-bar-chart": ""
|
|
2781
|
-
},
|
|
2782
|
-
groups:
|
|
2783
|
-
re(d(st),
|
|
2823
|
+
}, le(d(o))), ce({
|
|
2824
|
+
groups: P((O) => [
|
|
2825
|
+
re(d(st), j(O, { type: "stacked" }, le(d(o))), null, 16)
|
|
2784
2826
|
]),
|
|
2785
2827
|
_: 2
|
|
2786
2828
|
}, [
|
|
2787
|
-
|
|
2829
|
+
W(d(a), (O, b) => ({
|
|
2788
2830
|
name: b,
|
|
2789
|
-
fn:
|
|
2790
|
-
|
|
2831
|
+
fn: P((h) => [
|
|
2832
|
+
C(m.$slots, b, fe(he(h || {})))
|
|
2791
2833
|
])
|
|
2792
2834
|
}))
|
|
2793
2835
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
2794
2836
|
}
|
|
2795
|
-
}),
|
|
2837
|
+
}), hl = ["d", "stroke-width"], gl = 2, _l = /* @__PURE__ */ Z({
|
|
2796
2838
|
__name: "lume-line",
|
|
2797
2839
|
props: {
|
|
2798
2840
|
pathDefinition: {
|
|
@@ -2801,11 +2843,11 @@ const rl = {
|
|
|
2801
2843
|
},
|
|
2802
2844
|
width: {
|
|
2803
2845
|
type: Number,
|
|
2804
|
-
default:
|
|
2846
|
+
default: gl
|
|
2805
2847
|
},
|
|
2806
2848
|
color: {
|
|
2807
2849
|
type: String,
|
|
2808
|
-
default:
|
|
2850
|
+
default: ie.Skyblue
|
|
2809
2851
|
},
|
|
2810
2852
|
dashed: {
|
|
2811
2853
|
type: Boolean,
|
|
@@ -2827,37 +2869,37 @@ const rl = {
|
|
|
2827
2869
|
emits: ["click"],
|
|
2828
2870
|
setup(e, { emit: n }) {
|
|
2829
2871
|
const t = n, o = R(null);
|
|
2830
|
-
return
|
|
2872
|
+
return _e(() => je(o.value)), (a, u) => (_(), x("path", {
|
|
2831
2873
|
ref_key: "root",
|
|
2832
2874
|
ref: o,
|
|
2833
|
-
class:
|
|
2875
|
+
class: oe(["lume-line", {
|
|
2834
2876
|
[`lume-stroke--${e.color}`]: !0,
|
|
2835
2877
|
"lume-line--dashed": e.dashed,
|
|
2836
2878
|
"lume-line--transition": e.transition
|
|
2837
2879
|
}]),
|
|
2838
2880
|
d: e.pathDefinition,
|
|
2839
2881
|
"stroke-width": e.width,
|
|
2840
|
-
style:
|
|
2882
|
+
style: Bt({
|
|
2841
2883
|
animationDelay: e.transition && e.animationDelay + "s",
|
|
2842
2884
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2843
2885
|
}),
|
|
2844
2886
|
"data-j-line": "",
|
|
2845
|
-
onClick:
|
|
2846
|
-
}, null, 14,
|
|
2887
|
+
onClick: u[0] || (u[0] = (l) => t("click", l))
|
|
2888
|
+
}, null, 14, hl));
|
|
2847
2889
|
}
|
|
2848
2890
|
});
|
|
2849
|
-
const
|
|
2891
|
+
const yl = /* @__PURE__ */ ee(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx", "cy", "r", "stroke-width"], bl = 4, Al = /* @__PURE__ */ Z({
|
|
2850
2892
|
__name: "lume-point",
|
|
2851
2893
|
props: {
|
|
2852
2894
|
x: { type: Number, required: !0 },
|
|
2853
2895
|
y: { type: Number, required: !0 },
|
|
2854
2896
|
color: {
|
|
2855
2897
|
type: String,
|
|
2856
|
-
default:
|
|
2898
|
+
default: ie.Skyblue
|
|
2857
2899
|
},
|
|
2858
2900
|
radius: {
|
|
2859
2901
|
type: Number,
|
|
2860
|
-
default:
|
|
2902
|
+
default: bl
|
|
2861
2903
|
},
|
|
2862
2904
|
active: {
|
|
2863
2905
|
type: Boolean,
|
|
@@ -2866,50 +2908,50 @@ const fl = /* @__PURE__ */ q(pl, [["__scopeId", "data-v-08896455"]]), hl = ["cx"
|
|
|
2866
2908
|
},
|
|
2867
2909
|
emits: ["click"],
|
|
2868
2910
|
setup(e, { emit: n }) {
|
|
2869
|
-
const t = e, o = n, a = R(null),
|
|
2870
|
-
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", {
|
|
2871
2913
|
ref_key: "root",
|
|
2872
2914
|
ref: a,
|
|
2873
|
-
class:
|
|
2915
|
+
class: oe(["lume-point", `lume-stroke--${e.color}`]),
|
|
2874
2916
|
cx: e.x,
|
|
2875
2917
|
cy: e.y,
|
|
2876
2918
|
r: e.active ? e.radius : 0,
|
|
2877
|
-
"stroke-width":
|
|
2919
|
+
"stroke-width": u.value,
|
|
2878
2920
|
"data-j-point": "",
|
|
2879
2921
|
onClick: i[0] || (i[0] = (s) => o("click", s))
|
|
2880
|
-
}, null, 10,
|
|
2922
|
+
}, null, 10, kl));
|
|
2881
2923
|
}
|
|
2882
2924
|
});
|
|
2883
|
-
const
|
|
2884
|
-
function
|
|
2885
|
-
function n(
|
|
2925
|
+
const Tl = /* @__PURE__ */ ee(Al, [["__scopeId", "data-v-b6745177"]]);
|
|
2926
|
+
function nn(e) {
|
|
2927
|
+
function n(u) {
|
|
2886
2928
|
let l = null;
|
|
2887
|
-
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), []);
|
|
2888
2930
|
}
|
|
2889
|
-
function t(
|
|
2890
|
-
const
|
|
2891
|
-
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;
|
|
2892
2934
|
}
|
|
2893
|
-
function o(
|
|
2935
|
+
function o(u) {
|
|
2894
2936
|
return function(i) {
|
|
2895
|
-
return !!
|
|
2937
|
+
return !!u.find(
|
|
2896
2938
|
(s) => s.includes(i) || s.includes(i - 1)
|
|
2897
2939
|
);
|
|
2898
2940
|
};
|
|
2899
2941
|
}
|
|
2900
|
-
return { computedLineData: v(() => e.value.map((
|
|
2901
|
-
const l = n(
|
|
2942
|
+
return { computedLineData: v(() => e.value.map((u) => {
|
|
2943
|
+
const l = n(u.values);
|
|
2902
2944
|
return {
|
|
2903
|
-
...
|
|
2945
|
+
...u,
|
|
2904
2946
|
isDashed: o(l),
|
|
2905
|
-
values:
|
|
2906
|
-
var p,
|
|
2947
|
+
values: u.values.map((i, s) => {
|
|
2948
|
+
var p, r;
|
|
2907
2949
|
const c = l.find(
|
|
2908
2950
|
(f) => f.includes(s)
|
|
2909
2951
|
);
|
|
2910
2952
|
if (c) {
|
|
2911
2953
|
const f = c[0] - 1, g = c[c.length - 1] + 1;
|
|
2912
|
-
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;
|
|
2913
2955
|
return m == null && (m = T), T == null && (T = m), {
|
|
2914
2956
|
value: t(
|
|
2915
2957
|
m,
|
|
@@ -2917,7 +2959,7 @@ function qt(e) {
|
|
|
2917
2959
|
c.length,
|
|
2918
2960
|
c.indexOf(s)
|
|
2919
2961
|
),
|
|
2920
|
-
label:
|
|
2962
|
+
label: Pt
|
|
2921
2963
|
};
|
|
2922
2964
|
}
|
|
2923
2965
|
return i;
|
|
@@ -2925,29 +2967,29 @@ function qt(e) {
|
|
|
2925
2967
|
};
|
|
2926
2968
|
})) };
|
|
2927
2969
|
}
|
|
2928
|
-
function
|
|
2970
|
+
function Ll(e, n) {
|
|
2929
2971
|
const t = e.bandwidth() / 2;
|
|
2930
2972
|
return (o, a) => e(e.domain()[n + (a - 1)]) + t;
|
|
2931
2973
|
}
|
|
2932
|
-
function
|
|
2974
|
+
function Ol(e, n) {
|
|
2933
2975
|
return (t, o) => e(n + (o - 1));
|
|
2934
2976
|
}
|
|
2935
|
-
function
|
|
2936
|
-
return
|
|
2937
|
-
|
|
2938
|
-
).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);
|
|
2939
2981
|
}
|
|
2940
|
-
const
|
|
2982
|
+
const $l = {
|
|
2941
2983
|
class: "lume-line-group",
|
|
2942
2984
|
"data-j-lume-line-group": ""
|
|
2943
|
-
},
|
|
2985
|
+
}, Il = { class: "lume-line-group__lines" }, wl = {
|
|
2944
2986
|
key: 0,
|
|
2945
2987
|
class: "lume-line-group__points",
|
|
2946
2988
|
"data-j-lume-line-group__points": ""
|
|
2947
|
-
},
|
|
2989
|
+
}, El = 1, Nl = /* @__PURE__ */ Z({
|
|
2948
2990
|
__name: "lume-line-group",
|
|
2949
2991
|
props: {
|
|
2950
|
-
...
|
|
2992
|
+
...Ve(),
|
|
2951
2993
|
withPoints: {
|
|
2952
2994
|
type: Boolean,
|
|
2953
2995
|
default: !0
|
|
@@ -2959,155 +3001,155 @@ const Tl = {
|
|
|
2959
3001
|
},
|
|
2960
3002
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2961
3003
|
setup(e, { emit: n }) {
|
|
2962
|
-
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(
|
|
2963
3005
|
"tooltipAnchorAttributes",
|
|
2964
3006
|
null
|
|
2965
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
3007
|
+
), { updateTooltipAnchorAttributes: c } = Jt(
|
|
2966
3008
|
s,
|
|
2967
|
-
|
|
3009
|
+
u,
|
|
2968
3010
|
l,
|
|
2969
3011
|
i
|
|
2970
3012
|
), p = v(() => {
|
|
2971
|
-
if (a.value.every((
|
|
3013
|
+
if (a.value.every((D) => D.isDashed))
|
|
2972
3014
|
return a.value;
|
|
2973
|
-
const { computedLineData:
|
|
2974
|
-
return
|
|
2975
|
-
}),
|
|
3015
|
+
const { computedLineData: E } = nn(a);
|
|
3016
|
+
return u.value.withTooltip !== !1 && (s != null && s.value) && c(E.value), E.value;
|
|
3017
|
+
}), r = v(() => {
|
|
2976
3018
|
if (t.hoveredIndex === -1)
|
|
2977
3019
|
return;
|
|
2978
|
-
const
|
|
3020
|
+
const E = wn(
|
|
2979
3021
|
p.value,
|
|
2980
3022
|
t.hoveredIndex
|
|
2981
3023
|
);
|
|
2982
3024
|
return {
|
|
2983
3025
|
d: `M ${Ye(l.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
2984
|
-
V ${i.value(
|
|
3026
|
+
V ${i.value(E)}`
|
|
2985
3027
|
// Move to X index, Vertical line to the highest point
|
|
2986
3028
|
};
|
|
2987
3029
|
}), f = v(
|
|
2988
|
-
() => l.value &&
|
|
3030
|
+
() => l.value && El / (En(l.value) - 1)
|
|
2989
3031
|
// Subtracting the first line (read below)
|
|
2990
3032
|
), g = v(
|
|
2991
3033
|
() => {
|
|
2992
|
-
var
|
|
2993
|
-
return ((
|
|
3034
|
+
var E;
|
|
3035
|
+
return ((E = u.value) == null ? void 0 : E.lineWidth) * 2 || void 0;
|
|
2994
3036
|
}
|
|
2995
3037
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2996
3038
|
), m = v(
|
|
2997
3039
|
() => l.value.bandwidth() / 2
|
|
2998
3040
|
), T = v(() => l.value.domain()), O = v(
|
|
2999
|
-
() =>
|
|
3041
|
+
() => u.value.withPoints ?? t.withPoints
|
|
3000
3042
|
);
|
|
3001
|
-
function b(
|
|
3002
|
-
return p.value[
|
|
3043
|
+
function b(E) {
|
|
3044
|
+
return p.value[E].values;
|
|
3003
3045
|
}
|
|
3004
|
-
function h(
|
|
3005
|
-
var U,
|
|
3006
|
-
const
|
|
3007
|
-
(U = b(
|
|
3008
|
-
(
|
|
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
|
|
3009
3051
|
];
|
|
3010
|
-
return
|
|
3011
|
-
|
|
3012
|
-
|
|
3052
|
+
return xl(
|
|
3053
|
+
E,
|
|
3054
|
+
V,
|
|
3013
3055
|
l.value,
|
|
3014
3056
|
i.value
|
|
3015
3057
|
) || "";
|
|
3016
3058
|
}
|
|
3017
|
-
function $(
|
|
3059
|
+
function $(E) {
|
|
3018
3060
|
return {
|
|
3019
|
-
animationDelay:
|
|
3061
|
+
animationDelay: E < 2 ? 0 : (E - 1) * f.value,
|
|
3020
3062
|
animationDuration: f.value
|
|
3021
3063
|
};
|
|
3022
3064
|
}
|
|
3023
|
-
function w(
|
|
3065
|
+
function w(E, D) {
|
|
3024
3066
|
var U;
|
|
3025
|
-
const
|
|
3067
|
+
const V = (U = b(D)[E]) == null ? void 0 : U.value;
|
|
3026
3068
|
return {
|
|
3027
|
-
x:
|
|
3028
|
-
y: i.value(
|
|
3069
|
+
x: de(l.value) ? t.xScale(T.value[E]) + m.value : t.xScale(E),
|
|
3070
|
+
y: i.value(V)
|
|
3029
3071
|
};
|
|
3030
3072
|
}
|
|
3031
|
-
function
|
|
3032
|
-
return t.hoveredIndex ===
|
|
3073
|
+
function N(E) {
|
|
3074
|
+
return t.hoveredIndex === E;
|
|
3033
3075
|
}
|
|
3034
|
-
return (
|
|
3035
|
-
|
|
3076
|
+
return (E, D) => (_(), x("g", $l, [
|
|
3077
|
+
G("path", j(r.value, {
|
|
3036
3078
|
class: "lume-line-group__overlay-line",
|
|
3037
3079
|
"data-j-lume-line-group__overlay-line": ""
|
|
3038
3080
|
}), null, 16),
|
|
3039
|
-
(
|
|
3040
|
-
key:
|
|
3081
|
+
(_(!0), x(q, null, W(p.value, (V, U) => (_(), x("g", {
|
|
3082
|
+
key: V.label,
|
|
3041
3083
|
class: "lume-line-group__group"
|
|
3042
3084
|
}, [
|
|
3043
|
-
|
|
3044
|
-
(
|
|
3085
|
+
G("g", Il, [
|
|
3086
|
+
(_(!0), x(q, null, W(V.values, (ne, F) => (_(), K(d(yl), j($(F), {
|
|
3045
3087
|
key: `line-${F}`,
|
|
3046
|
-
color:
|
|
3047
|
-
dashed:
|
|
3088
|
+
color: V.color,
|
|
3089
|
+
dashed: V.isDashed(F),
|
|
3048
3090
|
"path-definition": h(F, U),
|
|
3049
3091
|
transition: e.transition,
|
|
3050
|
-
width: d(
|
|
3051
|
-
onClick: (
|
|
3092
|
+
width: d(u).lineWidth,
|
|
3093
|
+
onClick: (Q) => o("line-click", { index: F, datasetIndex: U, event: Q })
|
|
3052
3094
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3053
3095
|
]),
|
|
3054
|
-
O.value ? (
|
|
3055
|
-
(
|
|
3096
|
+
O.value ? (_(), x("g", wl, [
|
|
3097
|
+
(_(!0), x(q, null, W(V.values, (ne, F) => (_(), K(d(Tl), j(w(F, U), {
|
|
3056
3098
|
key: `point-${F}`,
|
|
3057
|
-
active:
|
|
3058
|
-
color:
|
|
3099
|
+
active: N(F),
|
|
3100
|
+
color: V.color,
|
|
3059
3101
|
index: F,
|
|
3060
3102
|
radius: g.value,
|
|
3061
|
-
onClick: (
|
|
3103
|
+
onClick: (Q) => o("point-click", { index: F, datasetIndex: U, event: Q })
|
|
3062
3104
|
}), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
|
|
3063
3105
|
])) : z("", !0)
|
|
3064
3106
|
]))), 128))
|
|
3065
3107
|
]));
|
|
3066
3108
|
}
|
|
3067
3109
|
});
|
|
3068
|
-
const
|
|
3069
|
-
margins:
|
|
3110
|
+
const on = /* @__PURE__ */ ee(Nl, [["__scopeId", "data-v-c4d7f0ca"]]), Dl = {
|
|
3111
|
+
margins: Te.VERTICAL,
|
|
3070
3112
|
startOnZero: !0,
|
|
3071
3113
|
withTooltip: !0,
|
|
3072
3114
|
xAxisOptions: {},
|
|
3073
3115
|
yAxisOptions: { gridLines: !0 }
|
|
3074
|
-
},
|
|
3116
|
+
}, Zl = /* @__PURE__ */ Z({
|
|
3075
3117
|
__name: "lume-line-chart",
|
|
3076
3118
|
props: {
|
|
3077
|
-
...
|
|
3119
|
+
...Ie(null, !1)
|
|
3078
3120
|
},
|
|
3079
3121
|
setup(e, { emit: n }) {
|
|
3080
|
-
const t = e, { componentEventPropagator: o } =
|
|
3081
|
-
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, {
|
|
3082
3124
|
"chart-type": "line",
|
|
3083
3125
|
options: d(l),
|
|
3084
3126
|
"data-j-lume-line-chart": ""
|
|
3085
|
-
},
|
|
3086
|
-
groups:
|
|
3087
|
-
re(d(
|
|
3127
|
+
}, le(d(o))), ce({
|
|
3128
|
+
groups: P((c) => [
|
|
3129
|
+
re(d(on), j(c, le(d(o))), null, 16)
|
|
3088
3130
|
]),
|
|
3089
3131
|
_: 2
|
|
3090
3132
|
}, [
|
|
3091
|
-
|
|
3133
|
+
W(d(a), (c, p) => ({
|
|
3092
3134
|
name: p,
|
|
3093
|
-
fn:
|
|
3094
|
-
|
|
3135
|
+
fn: P((r) => [
|
|
3136
|
+
C(i.$slots, p, fe(he(r || {})))
|
|
3095
3137
|
])
|
|
3096
3138
|
}))
|
|
3097
3139
|
]), 1040, ["options"]));
|
|
3098
3140
|
}
|
|
3099
3141
|
});
|
|
3100
|
-
function
|
|
3142
|
+
function Hl(e) {
|
|
3101
3143
|
return { areaPathDefinition: v(
|
|
3102
3144
|
() => function(t, o) {
|
|
3103
|
-
if (!t || !o)
|
|
3145
|
+
if (!t || !o || de(t) || de(o))
|
|
3104
3146
|
return;
|
|
3105
3147
|
const a = e.value[0].values;
|
|
3106
|
-
return
|
|
3148
|
+
return gn().x((u, l) => t(l)).y0(o(Math.min(...o.domain()))).y1((u) => o(u.value))(a);
|
|
3107
3149
|
}
|
|
3108
3150
|
) };
|
|
3109
3151
|
}
|
|
3110
|
-
const
|
|
3152
|
+
const Ml = {
|
|
3111
3153
|
margins: {
|
|
3112
3154
|
top: 0,
|
|
3113
3155
|
right: 0,
|
|
@@ -3121,14 +3163,14 @@ const El = {
|
|
|
3121
3163
|
tooltipOptions: {
|
|
3122
3164
|
showTitle: !1
|
|
3123
3165
|
}
|
|
3124
|
-
},
|
|
3166
|
+
}, Bl = ["d"], Rl = /* @__PURE__ */ Z({
|
|
3125
3167
|
__name: "lume-sparkline-chart",
|
|
3126
3168
|
props: {
|
|
3127
|
-
...
|
|
3128
|
-
...
|
|
3169
|
+
...rt(null),
|
|
3170
|
+
...He()
|
|
3129
3171
|
},
|
|
3130
3172
|
setup(e, { expose: n, emit: t }) {
|
|
3131
|
-
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(
|
|
3132
3174
|
() => l.value[0].areaColor || f.value
|
|
3133
3175
|
);
|
|
3134
3176
|
function m(O) {
|
|
@@ -3138,65 +3180,65 @@ const El = {
|
|
|
3138
3180
|
};
|
|
3139
3181
|
}
|
|
3140
3182
|
function T(O, b, h) {
|
|
3141
|
-
return
|
|
3183
|
+
return Ne().range([0, h.width]).domain([0, O[0].values.length - 1]);
|
|
3142
3184
|
}
|
|
3143
3185
|
return n({
|
|
3144
|
-
areaPathDefinition:
|
|
3145
|
-
}), (O, b) => (
|
|
3186
|
+
areaPathDefinition: r
|
|
3187
|
+
}), (O, b) => (_(), K(d(we), j(o, {
|
|
3146
3188
|
"chart-type": "line",
|
|
3147
3189
|
options: m(d(c)),
|
|
3148
3190
|
"x-scale": T
|
|
3149
|
-
},
|
|
3150
|
-
groups:
|
|
3151
|
-
d(c).showArea ? (
|
|
3191
|
+
}, le(d(a))), ce({
|
|
3192
|
+
groups: P((h) => [
|
|
3193
|
+
d(c).showArea ? (_(), x("path", {
|
|
3152
3194
|
key: 0,
|
|
3153
|
-
class:
|
|
3195
|
+
class: oe([
|
|
3154
3196
|
"sparkline-chart__area",
|
|
3155
3197
|
d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3156
3198
|
`lume-fill--${g.value || f.value}`,
|
|
3157
3199
|
"lume-fill--faded"
|
|
3158
3200
|
]),
|
|
3159
|
-
d: d(
|
|
3201
|
+
d: d(r)(h.xScale, h.yScale),
|
|
3160
3202
|
"data-j-sparkline__area": ""
|
|
3161
|
-
}, null, 10,
|
|
3162
|
-
re(d(
|
|
3203
|
+
}, null, 10, Bl)) : z("", !0),
|
|
3204
|
+
re(d(on), j(h, { "with-points": !1 }, le(d(a))), null, 16)
|
|
3163
3205
|
]),
|
|
3164
3206
|
_: 2
|
|
3165
3207
|
}, [
|
|
3166
|
-
|
|
3208
|
+
W(d(u), (h, $) => ({
|
|
3167
3209
|
name: $,
|
|
3168
|
-
fn:
|
|
3169
|
-
|
|
3210
|
+
fn: P((w) => [
|
|
3211
|
+
C(O.$slots, $, fe(he(w || {})), void 0, !0)
|
|
3170
3212
|
])
|
|
3171
3213
|
}))
|
|
3172
3214
|
]), 1040, ["options"]));
|
|
3173
3215
|
}
|
|
3174
3216
|
});
|
|
3175
|
-
const
|
|
3217
|
+
const Ul = /* @__PURE__ */ ee(Rl, [["__scopeId", "data-v-c681fff6"]]);
|
|
3176
3218
|
export {
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
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,
|
|
3184
3226
|
st as LumeBarGroup,
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
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
|
|
3201
3243
|
};
|
|
3202
3244
|
//# sourceMappingURL=index.js.map
|