@tekkare/auriga 0.2.183 → 0.2.185
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
|
@@ -155,7 +155,14 @@ export default defineComponent({
|
|
|
155
155
|
zoom: {
|
|
156
156
|
enabled: true,
|
|
157
157
|
allowMouseWheelZoom: false
|
|
158
|
-
}
|
|
158
|
+
},
|
|
159
|
+
// Configure global tooltip and null value handling
|
|
160
|
+
tooltip: {
|
|
161
|
+
intersect: false,
|
|
162
|
+
shared: true
|
|
163
|
+
},
|
|
164
|
+
// Critical setting to handle null values correctly
|
|
165
|
+
nullValues: "connect"
|
|
159
166
|
};
|
|
160
167
|
if (props.titleInChart) {
|
|
161
168
|
props.options["title"] = {
|
|
@@ -190,7 +197,16 @@ export default defineComponent({
|
|
|
190
197
|
} else {
|
|
191
198
|
props.options["title"] = { align: "center" };
|
|
192
199
|
}
|
|
193
|
-
props.options["yaxis"] = {
|
|
200
|
+
props.options["yaxis"] = {
|
|
201
|
+
min: minValue.value,
|
|
202
|
+
show: false,
|
|
203
|
+
forceNiceScale: true,
|
|
204
|
+
labels: {
|
|
205
|
+
formatter: (val) => {
|
|
206
|
+
return val === null ? "" : val;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
194
210
|
if (props.colors) {
|
|
195
211
|
props.options["colors"] = props.colors;
|
|
196
212
|
}
|
|
@@ -200,6 +216,16 @@ export default defineComponent({
|
|
|
200
216
|
props.options["stroke"] = { show: false };
|
|
201
217
|
} else props.options["stroke"] = { width: 3, curve: "smooth" };
|
|
202
218
|
}
|
|
219
|
+
props.options["stroke"] = {
|
|
220
|
+
...props.options["stroke"],
|
|
221
|
+
curve: "smooth",
|
|
222
|
+
width: 3,
|
|
223
|
+
// These settings ensure we don't connect through null values
|
|
224
|
+
dashArray: 0,
|
|
225
|
+
lineCap: "round",
|
|
226
|
+
// This is the key setting - it tells ApexCharts to skip null values
|
|
227
|
+
show: true
|
|
228
|
+
};
|
|
203
229
|
const defaultDataLabelsConfig = {
|
|
204
230
|
enabled: true,
|
|
205
231
|
position: "top",
|
|
@@ -212,6 +238,13 @@ export default defineComponent({
|
|
|
212
238
|
borderColor: "transparent",
|
|
213
239
|
opacity: 1,
|
|
214
240
|
borderRadius: 2
|
|
241
|
+
},
|
|
242
|
+
// This filter function is critical - it prevents data labels from appearing for null values
|
|
243
|
+
filter: {
|
|
244
|
+
type: "value",
|
|
245
|
+
value: "null",
|
|
246
|
+
condition: "ne"
|
|
247
|
+
// 'ne' means "not equal to"
|
|
215
248
|
}
|
|
216
249
|
};
|
|
217
250
|
if (props.options.dataLabels && props.options.dataLabels.formatter) {
|
|
@@ -222,6 +255,9 @@ export default defineComponent({
|
|
|
222
255
|
} else {
|
|
223
256
|
const defaultDataLabelFormatter = {
|
|
224
257
|
formatter(value, opt) {
|
|
258
|
+
if (value === null) {
|
|
259
|
+
return "";
|
|
260
|
+
}
|
|
225
261
|
let returnValue = value;
|
|
226
262
|
if (compactMode) {
|
|
227
263
|
returnValue = new Intl.NumberFormat("en-US", {
|
|
@@ -245,9 +281,7 @@ export default defineComponent({
|
|
|
245
281
|
}
|
|
246
282
|
}
|
|
247
283
|
}
|
|
248
|
-
|
|
249
|
-
return returnValue;
|
|
250
|
-
}
|
|
284
|
+
return returnValue;
|
|
251
285
|
}
|
|
252
286
|
};
|
|
253
287
|
props.options["dataLabels"] = {
|
|
@@ -267,7 +301,7 @@ export default defineComponent({
|
|
|
267
301
|
width: 10,
|
|
268
302
|
height: 10,
|
|
269
303
|
radius: 1,
|
|
270
|
-
showNullDataPoints:
|
|
304
|
+
showNullDataPoints: false
|
|
271
305
|
},
|
|
272
306
|
itemMargin: { vertical: 8, horizontal: 8 }
|
|
273
307
|
};
|
|
@@ -286,7 +320,15 @@ export default defineComponent({
|
|
|
286
320
|
}
|
|
287
321
|
};
|
|
288
322
|
if (props.options["markers"] === void 0) {
|
|
289
|
-
props.options["markers"] = {
|
|
323
|
+
props.options["markers"] = {
|
|
324
|
+
size: 0,
|
|
325
|
+
showNullDataPoints: false,
|
|
326
|
+
strokeWidth: 0,
|
|
327
|
+
hover: {
|
|
328
|
+
size: 5,
|
|
329
|
+
sizeOffset: 3
|
|
330
|
+
}
|
|
331
|
+
};
|
|
290
332
|
}
|
|
291
333
|
if (props.tooltipOptions) {
|
|
292
334
|
props.options["tooltip"] = props.tooltipOptions;
|
|
@@ -294,6 +336,9 @@ export default defineComponent({
|
|
|
294
336
|
props.options["tooltip"] = {
|
|
295
337
|
y: {
|
|
296
338
|
formatter(value, { series, seriesIndex, dataPointIndex, w }) {
|
|
339
|
+
if (value === null) {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
297
342
|
return value?.toLocaleString("fr-FR", {
|
|
298
343
|
minimumFractionDigits: 0,
|
|
299
344
|
maximumFractionDigits: 1
|
|
@@ -38,12 +38,13 @@
|
|
|
38
38
|
</label>
|
|
39
39
|
</div>
|
|
40
40
|
<div
|
|
41
|
+
v-show="sliderVisible"
|
|
41
42
|
class="toggle_option_slider"
|
|
42
43
|
:style="{
|
|
43
44
|
background: 'white',
|
|
44
45
|
left: silderInfos.left,
|
|
45
46
|
width: silderInfos.width,
|
|
46
|
-
height: silderInfos.height
|
|
47
|
+
height: silderInfos.height
|
|
47
48
|
}"
|
|
48
49
|
/>
|
|
49
50
|
</div>
|
|
@@ -52,7 +53,14 @@
|
|
|
52
53
|
</template>
|
|
53
54
|
|
|
54
55
|
<script>
|
|
55
|
-
import {
|
|
56
|
+
import {
|
|
57
|
+
defineComponent,
|
|
58
|
+
ref,
|
|
59
|
+
computed,
|
|
60
|
+
onMounted,
|
|
61
|
+
nextTick,
|
|
62
|
+
watch
|
|
63
|
+
} from "vue";
|
|
56
64
|
import ArgIcon from "./argIcon.vue";
|
|
57
65
|
export default defineComponent({
|
|
58
66
|
name: "ArgSliderTabs",
|
|
@@ -80,6 +88,7 @@ export default defineComponent({
|
|
|
80
88
|
setup(props) {
|
|
81
89
|
const el = ref();
|
|
82
90
|
const buttonContents = ref(null);
|
|
91
|
+
const sliderVisible = ref(false);
|
|
83
92
|
const silderInfos = computed(() => {
|
|
84
93
|
return getSliderInfos(props.activeTab);
|
|
85
94
|
});
|
|
@@ -87,22 +96,63 @@ export default defineComponent({
|
|
|
87
96
|
props.switchTab(value);
|
|
88
97
|
};
|
|
89
98
|
const getSliderInfos = (index) => {
|
|
90
|
-
if (el.value && buttonContents.value) {
|
|
99
|
+
if (el.value && buttonContents.value && buttonContents.value.length > 0) {
|
|
91
100
|
let left = 0;
|
|
92
101
|
for (let i = 0; i < index; i++) {
|
|
93
|
-
|
|
102
|
+
if (buttonContents.value[i]) {
|
|
103
|
+
left += buttonContents.value[i].clientWidth + 18;
|
|
104
|
+
}
|
|
94
105
|
}
|
|
95
|
-
const
|
|
106
|
+
const activeButton = buttonContents.value[index];
|
|
107
|
+
if (!activeButton) {
|
|
108
|
+
return { width: "0", left: "0", height: "0" };
|
|
109
|
+
}
|
|
110
|
+
const width = `${activeButton.clientWidth + 16}px`;
|
|
111
|
+
const height = `${el.value.clientHeight - 6}px`;
|
|
96
112
|
return {
|
|
97
113
|
width,
|
|
98
114
|
left: `${left}px`,
|
|
99
|
-
height
|
|
115
|
+
height
|
|
100
116
|
};
|
|
101
117
|
} else {
|
|
102
118
|
return { width: "0", left: "0", height: "0" };
|
|
103
119
|
}
|
|
104
120
|
};
|
|
105
|
-
|
|
121
|
+
const recalculateSlider = async () => {
|
|
122
|
+
await nextTick();
|
|
123
|
+
setTimeout(() => {
|
|
124
|
+
if (el.value && buttonContents.value && buttonContents.value.length > 0) {
|
|
125
|
+
const newInfos = getSliderInfos(props.activeTab);
|
|
126
|
+
if (newInfos.width !== "0") {
|
|
127
|
+
sliderVisible.value = true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}, 100);
|
|
131
|
+
};
|
|
132
|
+
watch(
|
|
133
|
+
() => props.activeTab,
|
|
134
|
+
() => {
|
|
135
|
+
recalculateSlider();
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
watch(
|
|
139
|
+
() => props.tabs,
|
|
140
|
+
() => {
|
|
141
|
+
sliderVisible.value = false;
|
|
142
|
+
recalculateSlider();
|
|
143
|
+
},
|
|
144
|
+
{ deep: true }
|
|
145
|
+
);
|
|
146
|
+
onMounted(() => {
|
|
147
|
+
recalculateSlider();
|
|
148
|
+
});
|
|
149
|
+
return {
|
|
150
|
+
updateButton,
|
|
151
|
+
el,
|
|
152
|
+
buttonContents,
|
|
153
|
+
silderInfos,
|
|
154
|
+
sliderVisible
|
|
155
|
+
};
|
|
106
156
|
}
|
|
107
157
|
});
|
|
108
158
|
</script>
|
|
@@ -33,6 +33,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
33
33
|
left: string;
|
|
34
34
|
height: string;
|
|
35
35
|
}>;
|
|
36
|
+
sliderVisible: import("vue").Ref<boolean, boolean>;
|
|
36
37
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
38
|
tabs: {
|
|
38
39
|
type: () => Tabs;
|