@makolabs/ripple 0.0.1-dev.27 → 0.0.1-dev.28
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/charts/Chart.svelte +4 -17
- package/dist/index.d.ts +16 -2
- package/package.json +1 -1
package/dist/charts/Chart.svelte
CHANGED
|
@@ -99,13 +99,6 @@
|
|
|
99
99
|
// Check if we have a pie/donut chart
|
|
100
100
|
const hasPieChart = $derived(series.some((s) => s.type === 'pie'));
|
|
101
101
|
|
|
102
|
-
// Check if we should show axis lines based on config or auto-detect from series type
|
|
103
|
-
const shouldShowAxisLines = $derived.by(() => {
|
|
104
|
-
if (config.showAxisLines !== undefined) return config.showAxisLines;
|
|
105
|
-
// Auto-detect: show for bar charts, hide for line charts
|
|
106
|
-
return series.some((s) => s.type === 'bar' || s.type === 'horizontal-bar');
|
|
107
|
-
});
|
|
108
|
-
|
|
109
102
|
let chartContainer: HTMLDivElement;
|
|
110
103
|
// @ts-expect-error - ECharts types are not available
|
|
111
104
|
let chart: echarts.ECharts;
|
|
@@ -440,11 +433,8 @@
|
|
|
440
433
|
splitLine: {
|
|
441
434
|
show: grid.vertical || false
|
|
442
435
|
},
|
|
443
|
-
axisLine: {
|
|
444
|
-
show:
|
|
445
|
-
lineStyle: {
|
|
446
|
-
color: 'rgba(0, 0, 0, 0.1)'
|
|
447
|
-
}
|
|
436
|
+
axisLine: xAxis.axisLine || {
|
|
437
|
+
show: false
|
|
448
438
|
}
|
|
449
439
|
},
|
|
450
440
|
|
|
@@ -457,11 +447,8 @@
|
|
|
457
447
|
position: axis.position || (index === 0 ? 'left' : 'right'),
|
|
458
448
|
min: axis.min,
|
|
459
449
|
max: axis.max,
|
|
460
|
-
axisLine: {
|
|
461
|
-
show:
|
|
462
|
-
lineStyle: {
|
|
463
|
-
color: 'rgba(0, 0, 0, 0.1)'
|
|
464
|
-
}
|
|
450
|
+
axisLine: axis.axisLine || {
|
|
451
|
+
show: false
|
|
465
452
|
},
|
|
466
453
|
axisLabel: {
|
|
467
454
|
// @ts-expect-error - ECharts types are not available
|
package/dist/index.d.ts
CHANGED
|
@@ -354,7 +354,14 @@ export type XAxisConfig<T> = {
|
|
|
354
354
|
rotate?: number;
|
|
355
355
|
interval?: number | 'auto' | Function;
|
|
356
356
|
};
|
|
357
|
-
|
|
357
|
+
axisLine?: {
|
|
358
|
+
show?: boolean;
|
|
359
|
+
lineStyle?: {
|
|
360
|
+
color?: string;
|
|
361
|
+
width?: number;
|
|
362
|
+
type?: 'solid' | 'dashed' | 'dotted';
|
|
363
|
+
};
|
|
364
|
+
};
|
|
358
365
|
};
|
|
359
366
|
export type YAxisConfig<T> = {
|
|
360
367
|
dataKey: keyof T;
|
|
@@ -364,7 +371,14 @@ export type YAxisConfig<T> = {
|
|
|
364
371
|
position?: 'left' | 'right';
|
|
365
372
|
min?: number;
|
|
366
373
|
max?: number;
|
|
367
|
-
|
|
374
|
+
axisLine?: {
|
|
375
|
+
show?: boolean;
|
|
376
|
+
lineStyle?: {
|
|
377
|
+
color?: string;
|
|
378
|
+
width?: number;
|
|
379
|
+
type?: 'solid' | 'dashed' | 'dotted';
|
|
380
|
+
};
|
|
381
|
+
};
|
|
368
382
|
};
|
|
369
383
|
export interface SeriesConfig<T> {
|
|
370
384
|
dataKey: keyof T;
|