@milaboratories/graph-maker 1.1.167 → 1.1.169
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/GraphMaker/constantsCommon.d.ts +5 -0
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +13 -8
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.js +60 -56
- package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.js +86 -58
- package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js +56 -38
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js +48 -30
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js +109 -112
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +20 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js +19 -15
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +3 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +8 -8
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +23 -23
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +7 -5
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/BubbleSettingsImpl.js +19 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/BubbleSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +132 -132
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +53 -53
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +7 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +49 -83
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +51 -34
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +8 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +8 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +54 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +2 -2
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js +31 -31
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +20 -20
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +12 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/fillCellsData.js +244 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/fillCellsData.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +28 -214
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js +26 -26
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +8 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +12 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/bubble.js +23 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/types/bubble.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +2 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetOrGroupKey.js +7 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetOrGroupKey.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +165 -95
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +64 -64
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +30 -30
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,121 +1,149 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { DEFAULT_CONTINUOUS_PALETTE as
|
|
4
|
-
import { createContinuousMappingFromPalette as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { PlBtnGroup as
|
|
9
|
-
import
|
|
10
|
-
const w = { class: "input-item" },
|
|
1
|
+
import { defineComponent as B, computed as s, ref as v, createElementBlock as O, openBlock as A, Fragment as x, createVNode as a, createBlock as y, createCommentVNode as E, createElementVNode as u, unref as n, withCtx as U } from "vue";
|
|
2
|
+
import { useStore as P } from "../../../store.js";
|
|
3
|
+
import { DEFAULT_CONTINUOUS_PALETTE as _, DEFAULT_BLACK as I, PALETTE_MAP as L } from "../../../constantsAesthetic.js";
|
|
4
|
+
import { createContinuousMappingFromPalette as z } from "../../../dataBindAes.js";
|
|
5
|
+
import D from "../../../components/MultiselectButton.vue.js";
|
|
6
|
+
import F from "../../../components/AesSettings/PalettesForm.vue.js";
|
|
7
|
+
import $ from "../../../components/AesSettings/FormWrapper.vue.js";
|
|
8
|
+
import { PlBtnGroup as p, PlCheckbox as V, PlNumberField as G } from "@platforma-sdk/ui-vue";
|
|
9
|
+
import R from "../AesSelector.vue.js";
|
|
10
|
+
const w = { class: "input-item" }, X = { class: "button-group-item" }, Y = { class: "button-group-item" }, H = { class: "checkbox-item" }, Z = { class: "checkbox-item" }, K = { class: "button-group-item" }, j = {
|
|
11
11
|
class: "button-group-item",
|
|
12
12
|
style: { display: "flex", alignItems: "end" }
|
|
13
|
-
},
|
|
13
|
+
}, ue = /* @__PURE__ */ B({
|
|
14
14
|
__name: "Bubble",
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const
|
|
15
|
+
setup(q) {
|
|
16
|
+
const i = P(), t = s(() => i.value.reactive.layersSettings.bubble), f = s(() => i.value.reactive.optionsState);
|
|
17
|
+
s(() => i.value.inputGuide.value);
|
|
18
|
+
const r = s(() => {
|
|
19
19
|
var o;
|
|
20
|
-
return (o =
|
|
21
|
-
}),
|
|
20
|
+
return (o = f.value.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
21
|
+
}), N = s(() => {
|
|
22
22
|
var o;
|
|
23
|
-
return
|
|
24
|
-
}),
|
|
23
|
+
return r.value ? (o = i.value.reactive.dataBindAes[r.value]) == null ? void 0 : o.palette : void 0;
|
|
24
|
+
}), m = v(!1), d = v(N.value ?? _);
|
|
25
25
|
function C(o) {
|
|
26
|
-
|
|
26
|
+
d.value = o, m.value = !1, r.value && (i.value.reactive.dataBindAes[r.value] = z(o));
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const k = [
|
|
29
29
|
{ label: "None", value: null },
|
|
30
30
|
{ label: "Columns", value: "column" },
|
|
31
31
|
{ label: "Rows", value: "row" }
|
|
32
|
-
],
|
|
32
|
+
], M = [
|
|
33
33
|
{ label: "z-score", value: "standardScaling" },
|
|
34
34
|
{ label: "Min-max", value: "meanNormalization" }
|
|
35
|
-
],
|
|
36
|
-
|
|
35
|
+
], S = [
|
|
36
|
+
{ label: "Mean", value: "mean" },
|
|
37
|
+
{ label: "Min", value: "min" },
|
|
38
|
+
{ label: "Max", value: "max" },
|
|
39
|
+
{ label: "Median", value: "median" }
|
|
40
|
+
], b = s({
|
|
41
|
+
get: () => t.value.strokeColor ?? I,
|
|
37
42
|
set: (o) => {
|
|
38
43
|
t.value.strokeColor = o;
|
|
39
44
|
}
|
|
40
|
-
}),
|
|
45
|
+
}), T = [
|
|
41
46
|
{ label: "empty", value: null },
|
|
42
47
|
{ label: "Special value", value: "custom" }
|
|
43
|
-
],
|
|
44
|
-
return (o, e) => (
|
|
45
|
-
a(
|
|
48
|
+
], g = v(t.value.NAValueAs !== null ? "custom" : t.value.NAValueAs), c = v(t.value.NAValueAs ?? 0);
|
|
49
|
+
return (o, e) => (A(), O(x, null, [
|
|
50
|
+
a(D, {
|
|
46
51
|
label: "Color Palette ",
|
|
47
|
-
title:
|
|
48
|
-
palette:
|
|
52
|
+
title: n(L)[d.value].title,
|
|
53
|
+
palette: d.value,
|
|
49
54
|
onButtonClick: e[0] || (e[0] = (l) => {
|
|
50
|
-
|
|
55
|
+
m.value = !0;
|
|
51
56
|
})
|
|
52
57
|
}, null, 8, ["title", "palette"]),
|
|
53
|
-
|
|
58
|
+
m.value ? (A(), y($, {
|
|
54
59
|
key: 0,
|
|
55
60
|
title: "Color Palette",
|
|
56
61
|
"back-title": "Color mapping",
|
|
57
|
-
"onForm:close": e[1] || (e[1] = (l) =>
|
|
62
|
+
"onForm:close": e[1] || (e[1] = (l) => m.value = !1)
|
|
58
63
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
a(
|
|
61
|
-
selected:
|
|
64
|
+
default: U(() => [
|
|
65
|
+
a(F, {
|
|
66
|
+
selected: d.value,
|
|
62
67
|
categorical: !1,
|
|
63
68
|
onSelect: C
|
|
64
69
|
}, null, 8, ["selected"])
|
|
65
70
|
]),
|
|
66
71
|
_: 1
|
|
67
|
-
})) :
|
|
68
|
-
|
|
69
|
-
a(
|
|
72
|
+
})) : E("", !0),
|
|
73
|
+
u("div", w, [
|
|
74
|
+
a(R, {
|
|
70
75
|
label: "Stroke color",
|
|
71
76
|
"form-title": "Stroke Color Settings",
|
|
72
77
|
"form-back-title": "Layers",
|
|
73
78
|
type: "stroke",
|
|
74
79
|
"possible-aes-source-inputs": [],
|
|
75
|
-
selected:
|
|
76
|
-
onAesUpdate: e[2] || (e[2] = (l) =>
|
|
80
|
+
selected: b.value,
|
|
81
|
+
onAesUpdate: e[2] || (e[2] = (l) => b.value = l)
|
|
77
82
|
}, null, 8, ["selected"])
|
|
78
83
|
]),
|
|
79
|
-
|
|
80
|
-
a(
|
|
84
|
+
u("div", X, [
|
|
85
|
+
a(n(p), {
|
|
81
86
|
label: "Normalize by",
|
|
82
|
-
options:
|
|
87
|
+
options: k,
|
|
83
88
|
compact: !0,
|
|
84
89
|
modelValue: t.value.normalizationDirection,
|
|
85
90
|
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.normalizationDirection = l)
|
|
86
91
|
}, null, 8, ["modelValue"])
|
|
87
92
|
]),
|
|
88
|
-
|
|
89
|
-
a(
|
|
93
|
+
u("div", Y, [
|
|
94
|
+
a(n(p), {
|
|
90
95
|
label: "Normalization method",
|
|
91
|
-
options:
|
|
96
|
+
options: M,
|
|
92
97
|
compact: !0,
|
|
93
98
|
modelValue: t.value.normalizationMethod,
|
|
94
99
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.normalizationMethod = l)
|
|
95
100
|
}, null, 8, ["modelValue"])
|
|
96
101
|
]),
|
|
97
|
-
|
|
98
|
-
a(
|
|
102
|
+
u("div", H, [
|
|
103
|
+
a(n(V), {
|
|
104
|
+
modelValue: t.value.aggregateByX,
|
|
105
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.aggregateByX = l)
|
|
106
|
+
}, null, 8, ["modelValue"]),
|
|
107
|
+
e[12] || (e[12] = u("span", null, "Aggregate X groups", -1))
|
|
108
|
+
]),
|
|
109
|
+
u("div", Z, [
|
|
110
|
+
a(n(V), {
|
|
111
|
+
modelValue: t.value.aggregateByY,
|
|
112
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.aggregateByY = l)
|
|
113
|
+
}, null, 8, ["modelValue"]),
|
|
114
|
+
e[13] || (e[13] = u("span", null, "Aggregate Y groups", -1))
|
|
115
|
+
]),
|
|
116
|
+
u("div", K, [
|
|
117
|
+
a(n(p), {
|
|
118
|
+
label: "Aggregation method",
|
|
119
|
+
options: S,
|
|
120
|
+
compact: !0,
|
|
121
|
+
modelValue: t.value.aggregationMethod,
|
|
122
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.value.aggregationMethod = l)
|
|
123
|
+
}, null, 8, ["modelValue"])
|
|
124
|
+
]),
|
|
125
|
+
u("div", j, [
|
|
126
|
+
a(n(p), {
|
|
99
127
|
label: "Treat NA value as:",
|
|
100
|
-
options:
|
|
128
|
+
options: T,
|
|
101
129
|
compact: !0,
|
|
102
|
-
modelValue:
|
|
130
|
+
modelValue: g.value,
|
|
103
131
|
"onUpdate:modelValue": [
|
|
104
|
-
e[
|
|
105
|
-
e[
|
|
132
|
+
e[8] || (e[8] = (l) => g.value = l),
|
|
133
|
+
e[9] || (e[9] = (l) => {
|
|
106
134
|
l === "custom" ? t.value.NAValueAs = c.value : t.value.NAValueAs = l;
|
|
107
135
|
})
|
|
108
136
|
]
|
|
109
137
|
}, null, 8, ["modelValue"]),
|
|
110
|
-
a(
|
|
138
|
+
a(n(G), {
|
|
111
139
|
style: { height: "33px", marginLeft: "16px", width: "75px" },
|
|
112
|
-
disabled:
|
|
140
|
+
disabled: g.value !== "custom",
|
|
113
141
|
label: "NA value",
|
|
114
142
|
useIncrementButtons: !1,
|
|
115
143
|
modelValue: c.value,
|
|
116
144
|
"onUpdate:modelValue": [
|
|
117
|
-
e[
|
|
118
|
-
e[
|
|
145
|
+
e[10] || (e[10] = (l) => c.value = l),
|
|
146
|
+
e[11] || (e[11] = (l) => {
|
|
119
147
|
l !== void 0 && (t.value.NAValueAs = l);
|
|
120
148
|
})
|
|
121
149
|
]
|
|
@@ -125,6 +153,6 @@ const w = { class: "input-item" }, R = { class: "button-group-item" }, G = { cla
|
|
|
125
153
|
}
|
|
126
154
|
});
|
|
127
155
|
export {
|
|
128
|
-
|
|
156
|
+
ue as default
|
|
129
157
|
};
|
|
130
158
|
//# sourceMappingURL=Bubble.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.vue.js","sources":["../../../../../src/GraphMaker/forms/LayersForm/Layer/Bubble.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../store';\nimport { BubbleLayer } from '../../../types';\nimport { computed, ref } from 'vue';\nimport {\n DEFAULT_BLACK,\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../../constantsAesthetic';\nimport { ContinuousPalette } from '../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../dataBindAes';\nimport MultiselectButton from '../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../components/AesSettings/FormWrapper.vue';\nimport { BubbleUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { PlBtnGroup, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\nimport AesSelector from '../AesSelector.vue';\n\nconst store = useStore();\nconst layer: BubbleLayer = 'bubble';\nconst settings = computed(() => store.value.reactive.layersSettings.bubble);\nconst optionsState = computed(() => store.value.reactive.optionsState as BubbleUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<BubbleUIState>);\n\nconst valueColor = computed(() => optionsState.value.components.valueColor.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => valueColor.value ? store.value.reactive.dataBindAes[valueColor.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (valueColor.value) {\n store.value.reactive.dataBindAes[valueColor.value] = createContinuousMappingFromPalette(value);\n }\n}\n\nconst NORMALIZATION_DIRECTION:SimpleOption[] = [\n {label: 'None', value: null},\n {label: 'Columns', value: 'column'},\n {label: 'Rows', value: 'row'},\n];\nconst NORMALIZATION_METHOD:SimpleOption[] = [\n {label: 'z-score', value: 'standardScaling'},\n {label: 'Min-max', value: 'meanNormalization'},\n]\n\nconst stroke = computed({\n get: () => {\n return settings.value.strokeColor ?? DEFAULT_BLACK\n },\n set: (v:string) => {\n settings.value.strokeColor = v;\n }\n});\n\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs !== null ? 'custom' : settings.value.NAValueAs);\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\" :categorical=\"false\" @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"input-item\">\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :possible-aes-source-inputs=\"[]\"\n :selected=\"stroke\"\n @aes-update=\"(v:string) => stroke = v\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","valueColor","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingFromPalette","NORMALIZATION_DIRECTION","NORMALIZATION_METHOD","stroke","DEFAULT_BLACK","v","NA_VALUE_OPTIONS","NAValueOption","customNA"],"mappings":";;;;;;;;;;;;;;;AAkBA,UAAMA,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAe,MAAM,GACpEI,IAAeD,EAAS,MAAMH,EAAM,MAAM,SAAS,YAA6B;AACnE,IAAAG,EAAS,MAAMH,EAAM,MAAM,WAAW,KAAkC;AAE3F,UAAMK,IAAaF,EAAS,MAAA;;AAAM,cAAAG,IAAAF,EAAa,MAAM,WAAW,WAAW,eAAe,CAAC,MAAzD,gBAAAE,EAA4D;AAAA,KAAc,GACtGC,IAAwBJ,EAAS,MAAA;;AAAM,aAAAE,EAAW,SAAQC,IAAAN,EAAM,MAAM,SAAS,YAAYK,EAAW,KAAK,MAAjD,gBAAAC,EAAoD,UAAU;AAAA,KAAS,GAEjIE,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAuBF,EAAsB,SAA8BI,CAA0B;AAErH,aAASC,EAAgBC,GAA0B;AACjD,MAAAH,EAAQ,QAAQG,GAChBL,EAAa,QAAQ,IACjBH,EAAW,UACbL,EAAM,MAAM,SAAS,YAAYK,EAAW,KAAK,IAAIS,EAAmCD,CAAK;AAAA,IAEjG;AAEA,UAAME,IAAyC;AAAA,MAC7C,EAAC,OAAO,QAAQ,OAAO,KAAA;AAAA,MACvB,EAAC,OAAO,WAAW,OAAO,SAAA;AAAA,MAC1B,EAAC,OAAO,QAAQ,OAAO,MAAA;AAAA,IAAK,GAExBC,IAAsC;AAAA,MAC1C,EAAC,OAAO,WAAW,OAAO,kBAAA;AAAA,MAC1B,EAAC,OAAO,WAAW,OAAO,oBAAA;AAAA,IAAmB,
|
|
1
|
+
{"version":3,"file":"Bubble.vue.js","sources":["../../../../../src/GraphMaker/forms/LayersForm/Layer/Bubble.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../store';\nimport { BubbleLayer } from '../../../types';\nimport { computed, ref } from 'vue';\nimport {\n DEFAULT_BLACK,\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../../constantsAesthetic';\nimport { ContinuousPalette } from '../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../dataBindAes';\nimport MultiselectButton from '../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../components/AesSettings/FormWrapper.vue';\nimport { BubbleUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { PlBtnGroup, PlCheckbox, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\nimport AesSelector from '../AesSelector.vue';\n\nconst store = useStore();\nconst layer: BubbleLayer = 'bubble';\nconst settings = computed(() => store.value.reactive.layersSettings.bubble);\nconst optionsState = computed(() => store.value.reactive.optionsState as BubbleUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<BubbleUIState>);\n\nconst valueColor = computed(() => optionsState.value.components.valueColor.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => valueColor.value ? store.value.reactive.dataBindAes[valueColor.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (valueColor.value) {\n store.value.reactive.dataBindAes[valueColor.value] = createContinuousMappingFromPalette(value);\n }\n}\n\nconst NORMALIZATION_DIRECTION:SimpleOption[] = [\n {label: 'None', value: null},\n {label: 'Columns', value: 'column'},\n {label: 'Rows', value: 'row'},\n];\nconst NORMALIZATION_METHOD:SimpleOption[] = [\n {label: 'z-score', value: 'standardScaling'},\n {label: 'Min-max', value: 'meanNormalization'},\n];\nconst AGGREGATION_METHOD: SimpleOption[] = [\n {label: 'Mean', value: 'mean'},\n {label: 'Min', value: 'min'},\n {label: 'Max', value: 'max'},\n {label: 'Median', value: 'median'},\n];\n\nconst stroke = computed({\n get: () => {\n return settings.value.strokeColor ?? DEFAULT_BLACK\n },\n set: (v:string) => {\n settings.value.strokeColor = v;\n }\n});\n\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs !== null ? 'custom' : settings.value.NAValueAs);\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\" :categorical=\"false\" @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"input-item\">\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :possible-aes-source-inputs=\"[]\"\n :selected=\"stroke\"\n @aes-update=\"(v:string) => stroke = v\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.aggregationMethod\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","valueColor","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingFromPalette","NORMALIZATION_DIRECTION","NORMALIZATION_METHOD","AGGREGATION_METHOD","stroke","DEFAULT_BLACK","v","NA_VALUE_OPTIONS","NAValueOption","customNA"],"mappings":";;;;;;;;;;;;;;;AAkBA,UAAMA,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAe,MAAM,GACpEI,IAAeD,EAAS,MAAMH,EAAM,MAAM,SAAS,YAA6B;AACnE,IAAAG,EAAS,MAAMH,EAAM,MAAM,WAAW,KAAkC;AAE3F,UAAMK,IAAaF,EAAS,MAAA;;AAAM,cAAAG,IAAAF,EAAa,MAAM,WAAW,WAAW,eAAe,CAAC,MAAzD,gBAAAE,EAA4D;AAAA,KAAc,GACtGC,IAAwBJ,EAAS,MAAA;;AAAM,aAAAE,EAAW,SAAQC,IAAAN,EAAM,MAAM,SAAS,YAAYK,EAAW,KAAK,MAAjD,gBAAAC,EAAoD,UAAU;AAAA,KAAS,GAEjIE,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAuBF,EAAsB,SAA8BI,CAA0B;AAErH,aAASC,EAAgBC,GAA0B;AACjD,MAAAH,EAAQ,QAAQG,GAChBL,EAAa,QAAQ,IACjBH,EAAW,UACbL,EAAM,MAAM,SAAS,YAAYK,EAAW,KAAK,IAAIS,EAAmCD,CAAK;AAAA,IAEjG;AAEA,UAAME,IAAyC;AAAA,MAC7C,EAAC,OAAO,QAAQ,OAAO,KAAA;AAAA,MACvB,EAAC,OAAO,WAAW,OAAO,SAAA;AAAA,MAC1B,EAAC,OAAO,QAAQ,OAAO,MAAA;AAAA,IAAK,GAExBC,IAAsC;AAAA,MAC1C,EAAC,OAAO,WAAW,OAAO,kBAAA;AAAA,MAC1B,EAAC,OAAO,WAAW,OAAO,oBAAA;AAAA,IAAmB,GAEzCC,IAAqC;AAAA,MACzC,EAAC,OAAO,QAAQ,OAAO,OAAA;AAAA,MACvB,EAAC,OAAO,OAAO,OAAO,MAAA;AAAA,MACtB,EAAC,OAAO,OAAO,OAAO,MAAA;AAAA,MACtB,EAAC,OAAO,UAAU,OAAO,SAAA;AAAA,IAAQ,GAG7BC,IAASf,EAAS;AAAA,MACtB,KAAK,MACID,EAAS,MAAM,eAAeiB;AAAA,MAEvC,KAAK,CAACC,MAAa;AACjB,QAAAlB,EAAS,MAAM,cAAckB;AAAA,MAC/B;AAAA,IAAA,CACD,GAEKC,IAAmC;AAAA,MACvC,EAAE,OAAO,SAAS,OAAO,KAAA;AAAA,MACzB,EAAE,OAAO,iBAAiB,OAAO,SAAA;AAAA,IAAS,GAGtCC,IAAgBb,EAAIP,EAAS,MAAM,cAAc,OAAO,WAAWA,EAAS,MAAM,SAAS,GAC3FqB,IAAWd,EAAIP,EAAS,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";AA8WA,wBAKG"}
|
|
@@ -1,53 +1,71 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { useDefaultAes as
|
|
4
|
-
import { DEFAULT_WHITE as
|
|
5
|
-
import
|
|
6
|
-
import { Slider as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as s, createElementBlock as C, openBlock as U, Fragment as A, createVNode as o, createElementVNode as i, withModifiers as O, unref as n } from "vue";
|
|
2
|
+
import { useStore as B } from "../../../../store.js";
|
|
3
|
+
import { useDefaultAes as y } from "./utils.js";
|
|
4
|
+
import { DEFAULT_WHITE as E, DEFAULT_BLACK as w } from "../../../../constantsAesthetic.js";
|
|
5
|
+
import b from "../../AesSelector.vue.js";
|
|
6
|
+
import { PlDropdown as F, Slider as c, PlCheckbox as V } from "@platforma-sdk/ui-vue";
|
|
7
|
+
const L = { class: "checkbox-item" }, M = { class: "checkbox-item" }, m = "stackedArea", G = /* @__PURE__ */ x({
|
|
8
8
|
__name: "StackedArea",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
() =>
|
|
12
|
-
), S =
|
|
13
|
-
() =>
|
|
14
|
-
),
|
|
15
|
-
() =>
|
|
9
|
+
setup(N) {
|
|
10
|
+
const r = B(), t = s(() => r.value.reactive.layersSettings[m]), d = s(
|
|
11
|
+
() => r.value.reactive.optionsState
|
|
12
|
+
), S = s(
|
|
13
|
+
() => y(t.value.fillColor, d.value, E)
|
|
14
|
+
), g = s(
|
|
15
|
+
() => y(t.value.lineColor, d.value, w)
|
|
16
16
|
);
|
|
17
|
-
function
|
|
18
|
-
e.type === "dataCategorical" ?
|
|
17
|
+
function p(a, e, l) {
|
|
18
|
+
e.type === "dataCategorical" ? r.value.reactive.layersSettings[m][l] = {
|
|
19
19
|
type: e.inputName
|
|
20
|
-
} :
|
|
20
|
+
} : r.value.reactive.layersSettings[m][l] = a, e.type === "dataCategorical" && typeof a != "string" && (r.value.reactive.dataBindAes[e.selectedSource] = a);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const k = [
|
|
23
|
+
{ text: "Sum", value: "sum" },
|
|
24
|
+
{ text: "Min", value: "min" },
|
|
25
|
+
{ text: "Max", value: "max" },
|
|
26
|
+
{ text: "Mean", value: "mean" },
|
|
27
|
+
{ text: "Median", value: "median" }
|
|
28
|
+
], v = s({
|
|
23
29
|
get: () => t.value.barsOpacity * 100,
|
|
24
30
|
set: (a) => {
|
|
25
31
|
t.value.barsOpacity = a / 100;
|
|
26
32
|
}
|
|
27
|
-
}), f =
|
|
33
|
+
}), f = s({
|
|
28
34
|
get: () => t.value.areaOpacity * 100,
|
|
29
35
|
set: (a) => {
|
|
30
36
|
t.value.areaOpacity = a / 100;
|
|
31
37
|
}
|
|
32
38
|
});
|
|
33
|
-
return (a, e) => (
|
|
34
|
-
|
|
39
|
+
return (a, e) => (U(), C(A, null, [
|
|
40
|
+
o(b, {
|
|
35
41
|
label: "Fill color",
|
|
36
42
|
"form-title": "Fill Color Settings",
|
|
37
43
|
"form-back-title": "Layers",
|
|
38
44
|
type: "fill",
|
|
39
45
|
selected: S.value,
|
|
40
|
-
onAesUpdate: e[0] || (e[0] = (l, u) =>
|
|
46
|
+
onAesUpdate: e[0] || (e[0] = (l, u) => p(l, u, "fillColor"))
|
|
41
47
|
}, null, 8, ["selected"]),
|
|
42
|
-
|
|
48
|
+
o(b, {
|
|
43
49
|
label: "Stroke color",
|
|
44
50
|
"form-title": "Stroke Color Settings",
|
|
45
51
|
"form-back-title": "Layers",
|
|
46
52
|
type: "stroke",
|
|
47
|
-
selected:
|
|
48
|
-
onAesUpdate: e[1] || (e[1] = (l, u) =>
|
|
53
|
+
selected: g.value,
|
|
54
|
+
onAesUpdate: e[1] || (e[1] = (l, u) => p(l, u, "lineColor"))
|
|
49
55
|
}, null, 8, ["selected"]),
|
|
50
|
-
|
|
56
|
+
i("div", {
|
|
57
|
+
class: "input-item",
|
|
58
|
+
onClick: e[3] || (e[3] = O(() => {
|
|
59
|
+
}, ["stop"]))
|
|
60
|
+
}, [
|
|
61
|
+
o(n(F), {
|
|
62
|
+
label: "Height",
|
|
63
|
+
options: k,
|
|
64
|
+
modelValue: t.value.height,
|
|
65
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.height = l)
|
|
66
|
+
}, null, 8, ["modelValue"])
|
|
67
|
+
]),
|
|
68
|
+
o(n(c), {
|
|
51
69
|
label: "Opacity of bars",
|
|
52
70
|
min: 0,
|
|
53
71
|
max: 100,
|
|
@@ -55,9 +73,9 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
|
|
|
55
73
|
breakpoints: !1,
|
|
56
74
|
measure: "%",
|
|
57
75
|
modelValue: v.value,
|
|
58
|
-
"onUpdate:modelValue": e[
|
|
76
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => v.value = l)
|
|
59
77
|
}, null, 8, ["modelValue"]),
|
|
60
|
-
|
|
78
|
+
o(n(c), {
|
|
61
79
|
label: "Opacity of areas",
|
|
62
80
|
min: 0,
|
|
63
81
|
max: 100,
|
|
@@ -65,26 +83,26 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
|
|
|
65
83
|
breakpoints: !1,
|
|
66
84
|
measure: "%",
|
|
67
85
|
modelValue: f.value,
|
|
68
|
-
"onUpdate:modelValue": e[
|
|
86
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => f.value = l)
|
|
69
87
|
}, null, 8, ["modelValue"]),
|
|
70
|
-
i("div",
|
|
71
|
-
|
|
88
|
+
i("div", L, [
|
|
89
|
+
o(n(V), {
|
|
72
90
|
modelValue: t.value.normalize,
|
|
73
|
-
"onUpdate:modelValue": e[
|
|
91
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.normalize = l)
|
|
74
92
|
}, null, 8, ["modelValue"]),
|
|
75
|
-
e[
|
|
93
|
+
e[8] || (e[8] = i("span", null, "Normalize", -1))
|
|
76
94
|
]),
|
|
77
|
-
i("div",
|
|
78
|
-
|
|
95
|
+
i("div", M, [
|
|
96
|
+
o(n(V), {
|
|
79
97
|
modelValue: t.value.showBars,
|
|
80
|
-
"onUpdate:modelValue": e[
|
|
98
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.value.showBars = l)
|
|
81
99
|
}, null, 8, ["modelValue"]),
|
|
82
|
-
e[
|
|
100
|
+
e[9] || (e[9] = i("span", null, "Show bars", -1))
|
|
83
101
|
])
|
|
84
102
|
], 64));
|
|
85
103
|
}
|
|
86
104
|
});
|
|
87
105
|
export {
|
|
88
|
-
|
|
106
|
+
G as default
|
|
89
107
|
};
|
|
90
108
|
//# sourceMappingURL=StackedArea.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedArea\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst barOpacity = computed({\n get: () => settings.value.barsOpacity * 100,\n set: (newValue: number) => {\n settings.value.barsOpacity = newValue / 100;\n }\n});\nconst areaOpacity = computed({\n get: () => settings.value.areaOpacity * 100,\n set: (newValue: number) => {\n settings.value.areaOpacity = newValue / 100;\n }\n});\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.showBars\" />\n <span>Show bars</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","barOpacity","newValue","areaOpacity"],"mappings":";;;;;;sEAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,
|
|
1
|
+
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedArea\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\n\nconst barOpacity = computed({\n get: () => settings.value.barsOpacity * 100,\n set: (newValue: number) => {\n settings.value.barsOpacity = newValue / 100;\n }\n});\nconst areaOpacity = computed({\n get: () => settings.value.areaOpacity * 100,\n set: (newValue: number) => {\n settings.value.areaOpacity = newValue / 100;\n }\n});\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.showBars\" />\n <span>Show bars</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","HEIGHT_OPTIONS","barOpacity","newValue","areaOpacity"],"mappings":";;;;;;sEAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,IAAkD;AAAA,MACtD,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,QAAQ,OAAO,OAAA;AAAA,MACvB,EAAE,MAAM,UAAU,OAAO,SAAA;AAAA,IAAS,GAG9BC,IAAaZ,EAAS;AAAA,MAC1B,KAAK,MAAMD,EAAS,MAAM,cAAc;AAAA,MACxC,KAAK,CAACc,MAAqB;AACzB,QAAAd,EAAS,MAAM,cAAcc,IAAW;AAAA,MAC1C;AAAA,IAAA,CACD,GACKC,IAAcd,EAAS;AAAA,MAC3B,KAAK,MAAMD,EAAS,MAAM,cAAc;AAAA,MACxC,KAAK,CAACc,MAAqB;AACzB,QAAAd,EAAS,MAAM,cAAcc,IAAW;AAAA,MAC1C;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";AAiTA,wBAKG"}
|
|
@@ -1,68 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
1
|
+
import { defineComponent as C, computed as i, createElementBlock as k, openBlock as x, Fragment as V, createVNode as n, createElementVNode as s, withModifiers as b, unref as u } from "vue";
|
|
2
|
+
import { useStore as U } from "../../../../store.js";
|
|
3
3
|
import { useDefaultAes as f } from "./utils.js";
|
|
4
|
-
import { DEFAULT_WHITE as A, DEFAULT_BLACK as
|
|
5
|
-
import
|
|
6
|
-
import { Slider as
|
|
7
|
-
const
|
|
4
|
+
import { DEFAULT_WHITE as A, DEFAULT_BLACK as B } from "../../../../constantsAesthetic.js";
|
|
5
|
+
import c from "../../AesSelector.vue.js";
|
|
6
|
+
import { PlDropdown as E, Slider as F, PlCheckbox as L } from "@platforma-sdk/ui-vue";
|
|
7
|
+
const M = { class: "checkbox-item" }, m = "stackedBar", w = /* @__PURE__ */ C({
|
|
8
8
|
__name: "StackedBar",
|
|
9
|
-
setup(
|
|
10
|
-
const a =
|
|
9
|
+
setup(N) {
|
|
10
|
+
const a = U(), l = i(() => a.value.reactive.layersSettings[m]), d = i(
|
|
11
11
|
() => a.value.reactive.optionsState
|
|
12
|
-
), y =
|
|
13
|
-
() => f(l.value.fillColor,
|
|
14
|
-
),
|
|
15
|
-
() => f(l.value.lineColor,
|
|
12
|
+
), y = i(
|
|
13
|
+
() => f(l.value.fillColor, d.value, A)
|
|
14
|
+
), S = i(
|
|
15
|
+
() => f(l.value.lineColor, d.value, B)
|
|
16
16
|
);
|
|
17
|
-
function
|
|
18
|
-
e.type === "dataCategorical" ? a.value.reactive.layersSettings[
|
|
17
|
+
function p(o, e, t) {
|
|
18
|
+
e.type === "dataCategorical" ? a.value.reactive.layersSettings[m][t] = {
|
|
19
19
|
type: e.inputName
|
|
20
|
-
} : a.value.reactive.layersSettings[
|
|
20
|
+
} : a.value.reactive.layersSettings[m][t] = o, e.type === "dataCategorical" && typeof o != "string" && (a.value.reactive.dataBindAes[e.selectedSource] = o);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const g = [
|
|
23
|
+
{ text: "Sum", value: "sum" },
|
|
24
|
+
{ text: "Min", value: "min" },
|
|
25
|
+
{ text: "Max", value: "max" },
|
|
26
|
+
{ text: "Mean", value: "mean" },
|
|
27
|
+
{ text: "Median", value: "median" }
|
|
28
|
+
], v = i({
|
|
23
29
|
get: () => l.value.opacity * 100,
|
|
24
30
|
set: (o) => {
|
|
25
31
|
l.value.opacity = o / 100;
|
|
26
32
|
}
|
|
27
33
|
});
|
|
28
|
-
return (o, e) => (
|
|
29
|
-
|
|
34
|
+
return (o, e) => (x(), k(V, null, [
|
|
35
|
+
n(c, {
|
|
30
36
|
label: "Fill color",
|
|
31
37
|
"form-title": "Fill Color Settings",
|
|
32
38
|
"form-back-title": "Layers",
|
|
33
39
|
type: "fill",
|
|
34
40
|
selected: y.value,
|
|
35
|
-
onAesUpdate: e[0] || (e[0] = (t,
|
|
41
|
+
onAesUpdate: e[0] || (e[0] = (t, r) => p(t, r, "fillColor"))
|
|
36
42
|
}, null, 8, ["selected"]),
|
|
37
|
-
|
|
43
|
+
n(c, {
|
|
38
44
|
label: "Stroke color",
|
|
39
45
|
"form-title": "Stroke Color Settings",
|
|
40
46
|
"form-back-title": "Layers",
|
|
41
47
|
type: "stroke",
|
|
42
|
-
selected:
|
|
43
|
-
onAesUpdate: e[1] || (e[1] = (t,
|
|
48
|
+
selected: S.value,
|
|
49
|
+
onAesUpdate: e[1] || (e[1] = (t, r) => p(t, r, "lineColor"))
|
|
44
50
|
}, null, 8, ["selected"]),
|
|
45
|
-
s(
|
|
51
|
+
s("div", {
|
|
52
|
+
class: "input-item",
|
|
53
|
+
onClick: e[3] || (e[3] = b(() => {
|
|
54
|
+
}, ["stop"]))
|
|
55
|
+
}, [
|
|
56
|
+
n(u(E), {
|
|
57
|
+
label: "Height",
|
|
58
|
+
options: g,
|
|
59
|
+
modelValue: l.value.height,
|
|
60
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => l.value.height = t)
|
|
61
|
+
}, null, 8, ["modelValue"])
|
|
62
|
+
]),
|
|
63
|
+
n(u(F), {
|
|
46
64
|
label: "Opacity",
|
|
47
65
|
min: 0,
|
|
48
66
|
max: 100,
|
|
49
67
|
step: 1,
|
|
50
68
|
breakpoints: !1,
|
|
51
69
|
measure: "%",
|
|
52
|
-
modelValue:
|
|
53
|
-
"onUpdate:modelValue": e[
|
|
70
|
+
modelValue: v.value,
|
|
71
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => v.value = t)
|
|
54
72
|
}, null, 8, ["modelValue"]),
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
s("div", M, [
|
|
74
|
+
n(u(L), {
|
|
57
75
|
modelValue: l.value.normalize,
|
|
58
|
-
"onUpdate:modelValue": e[
|
|
76
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => l.value.normalize = t)
|
|
59
77
|
}, null, 8, ["modelValue"]),
|
|
60
|
-
e[
|
|
78
|
+
e[6] || (e[6] = s("span", null, "Normalize", -1))
|
|
61
79
|
])
|
|
62
80
|
], 64));
|
|
63
81
|
}
|
|
64
82
|
});
|
|
65
83
|
export {
|
|
66
|
-
|
|
84
|
+
w as default
|
|
67
85
|
};
|
|
68
86
|
//# sourceMappingURL=StackedBar.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedBar\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n }\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","opacity","newValue"],"mappings":";;;;;;sCAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,
|
|
1
|
+
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedBar\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n }\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","HEIGHT_OPTIONS","opacity","newValue"],"mappings":";;;;;;sCAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,IAAkD;AAAA,MACtD,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,QAAQ,OAAO,OAAA;AAAA,MACvB,EAAE,MAAM,UAAU,OAAO,SAAA;AAAA,IAAS,GAG9BC,IAAUZ,EAAS;AAAA,MACvB,KAAK,MAAMD,EAAS,MAAM,UAAU;AAAA,MACpC,KAAK,CAACc,MAAqB;AACzB,QAAAd,EAAS,MAAM,UAAUc,IAAW;AAAA,MACtC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|