@tekkare/auriga 0.2.11 → 0.2.13
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/module.json
CHANGED
|
@@ -115,6 +115,12 @@ export default defineComponent({
|
|
|
115
115
|
const seriesData = props.series;
|
|
116
116
|
const hasPercentages = props.withPercentages;
|
|
117
117
|
const compactMode = props.compactValues;
|
|
118
|
+
const minValue = ref(0);
|
|
119
|
+
const allValues = props.series.map((a) => a?.data).flat();
|
|
120
|
+
if (Math.min(...allValues) > 0) {
|
|
121
|
+
minValue.value = 0;
|
|
122
|
+
} else
|
|
123
|
+
minValue.value = Math.min(...allValues);
|
|
118
124
|
if (props.hideLegend) {
|
|
119
125
|
props.options["legend"] = { show: false };
|
|
120
126
|
}
|
|
@@ -162,6 +168,7 @@ export default defineComponent({
|
|
|
162
168
|
} else {
|
|
163
169
|
props.options["title"] = { align: "center" };
|
|
164
170
|
}
|
|
171
|
+
props.options["yaxis"] = { min: minValue.value, show: false };
|
|
165
172
|
if (props.colors) {
|
|
166
173
|
props.options["colors"] = props.colors;
|
|
167
174
|
}
|
|
@@ -253,7 +260,6 @@ export default defineComponent({
|
|
|
253
260
|
}
|
|
254
261
|
}
|
|
255
262
|
};
|
|
256
|
-
props.options["yaxis"] = { min: 0, show: false };
|
|
257
263
|
if (props.options["markers"] === void 0) {
|
|
258
264
|
props.options["markers"] = { size: 0, showNullDataPoints: true };
|
|
259
265
|
}
|
|
@@ -263,7 +269,10 @@ export default defineComponent({
|
|
|
263
269
|
props.options["tooltip"] = {
|
|
264
270
|
y: {
|
|
265
271
|
formatter(value, { series, seriesIndex, dataPointIndex, w }) {
|
|
266
|
-
return value
|
|
272
|
+
return value?.toLocaleString("fr-FR", {
|
|
273
|
+
minimumFractionDigits: 0,
|
|
274
|
+
maximumFractionDigits: 1
|
|
275
|
+
}).replace(",", ".");
|
|
267
276
|
}
|
|
268
277
|
},
|
|
269
278
|
shared: false
|
|
@@ -344,7 +353,6 @@ export default defineComponent({
|
|
|
344
353
|
}
|
|
345
354
|
}
|
|
346
355
|
};
|
|
347
|
-
props.options["yaxis"] = { show: false, min: 0 };
|
|
348
356
|
} else if (props.type === "bar-horizontal") {
|
|
349
357
|
let predefinedColors = false;
|
|
350
358
|
if (props.colors) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="oip_table_card map_card-container" :id="`container_map-${title}`">
|
|
3
3
|
<div class="p-24">
|
|
4
|
-
<div class="oip_row v-center">
|
|
4
|
+
<div class="oip_row v-center oip_subtitle">
|
|
5
5
|
{{ title ? title : "Your map title" }}
|
|
6
6
|
<p class="blue">
|
|
7
7
|
{{ withDynamicTitle && clickedRegion ? ", " + clickedRegion : "" }}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
@click="handleBackClick"
|
|
73
73
|
>
|
|
74
74
|
<ArgIcon name="CaretLeft" size="16" />
|
|
75
|
-
<p>
|
|
75
|
+
<p>{{ getReturnText }}</p>
|
|
76
76
|
</div>
|
|
77
77
|
|
|
78
78
|
<svg
|
|
@@ -818,7 +818,10 @@ export default defineComponent({
|
|
|
818
818
|
lang: {
|
|
819
819
|
type: String,
|
|
820
820
|
default: "en",
|
|
821
|
-
required: false
|
|
821
|
+
required: false,
|
|
822
|
+
validator: (value) => {
|
|
823
|
+
return ["en", "fr"].includes(value);
|
|
824
|
+
}
|
|
822
825
|
}
|
|
823
826
|
},
|
|
824
827
|
emits: ["openSource"],
|
|
@@ -1003,6 +1006,10 @@ export default defineComponent({
|
|
|
1003
1006
|
width: 300
|
|
1004
1007
|
};
|
|
1005
1008
|
}
|
|
1009
|
+
const getReturnText = computed(() => {
|
|
1010
|
+
const returnText = { en: "Return to regions", fr: "Retour aux re\u0301gions" };
|
|
1011
|
+
return returnText[props.lang];
|
|
1012
|
+
});
|
|
1006
1013
|
onMounted(() => {
|
|
1007
1014
|
setupScale();
|
|
1008
1015
|
setUpDepartementScale();
|
|
@@ -1118,7 +1125,8 @@ export default defineComponent({
|
|
|
1118
1125
|
componentKey,
|
|
1119
1126
|
Regions,
|
|
1120
1127
|
getColor,
|
|
1121
|
-
regionsPath
|
|
1128
|
+
regionsPath,
|
|
1129
|
+
getReturnText
|
|
1122
1130
|
};
|
|
1123
1131
|
}
|
|
1124
1132
|
});
|
|
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
type: StringConstructor;
|
|
29
29
|
default: string;
|
|
30
30
|
required: false;
|
|
31
|
+
validator: (value: string) => boolean;
|
|
31
32
|
};
|
|
32
33
|
}, {
|
|
33
34
|
dptScale: import("vue").Ref<number[]>;
|
|
@@ -58,6 +59,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
59
|
Regions: typeof Regions;
|
|
59
60
|
getColor: (value?: number) => "var(--lightest)" | "#3F1151" | "#432974" | "#404A85" | "#3F668A" | "#43808C" | "#4C9C8A" | "#5FB57E" | "#85CB68" | "#BDDD51" | "#F9E855" | undefined;
|
|
60
61
|
regionsPath: any;
|
|
62
|
+
getReturnText: import("vue").ComputedRef<any>;
|
|
61
63
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "openSource"[], "openSource", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
64
|
data: {
|
|
63
65
|
type: PropType<Data[]>;
|
|
@@ -82,6 +84,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
84
|
type: StringConstructor;
|
|
83
85
|
default: string;
|
|
84
86
|
required: false;
|
|
87
|
+
validator: (value: string) => boolean;
|
|
85
88
|
};
|
|
86
89
|
}>> & {
|
|
87
90
|
onOpenSource?: ((...args: any[]) => any) | undefined;
|