@tekkare/auriga 0.2.184 → 0.2.186

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
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.2.184"
7
+ "version": "0.2.186"
8
8
  }
@@ -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"] = { min: minValue.value, show: false };
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
- if (seriesData[opt.seriesIndex]?.data[opt.dataPointIndex] !== null) {
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: true
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"] = { size: 0, showNullDataPoints: true };
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
@@ -75,9 +75,10 @@ export default defineComponent({
75
75
  );
76
76
  function goBack() {
77
77
  if (props.cancelLink !== null) {
78
- router.push(props.cancelLink);
78
+ window.location.href = props.cancelLink;
79
+ } else {
80
+ router.back();
79
81
  }
80
- router.back();
81
82
  }
82
83
  return {
83
84
  router,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.184",
3
+ "version": "0.2.186",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",