@likable-hair/svelte 3.1.47 → 3.1.49
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.
|
@@ -25,20 +25,23 @@ ChartJS.register(
|
|
|
25
25
|
export let data = {
|
|
26
26
|
labels: [],
|
|
27
27
|
datasets: []
|
|
28
|
-
}, horizontal = false, responsive = true, maintainAspectRatio = true, showLegend = true, showYTicks = false, showXTicks = false, displayYGrid = true, lineWidth = 1, enableZoom = true, resetZoom = false, tooltipLabel = void 0, yTickLabel = void 0, xTickLabel = void 0;
|
|
28
|
+
}, horizontal = false, responsive = true, maintainAspectRatio = true, showLegend = true, showYTicks = false, showXTicks = false, displayYGrid = true, lineWidth = 1, enableZoom = true, resetZoom = false, tooltipLabel = void 0, yTickLabel = void 0, xTickLabel = void 0, xTickStepSize = void 0, yTickStepSize = void 0;
|
|
29
29
|
let mounted = false, zoomMounted = false;
|
|
30
30
|
onMount(() => {
|
|
31
31
|
mounted = true;
|
|
32
32
|
});
|
|
33
|
-
let rgbTooltipColor = void 0;
|
|
34
|
-
let rgbTooltipBackgroundColor = void 0;
|
|
35
|
-
let rgbBackgroundColor = void 0;
|
|
33
|
+
export let rgbTooltipColor = void 0;
|
|
34
|
+
export let rgbTooltipBackgroundColor = void 0;
|
|
35
|
+
export let rgbBackgroundColor = void 0;
|
|
36
36
|
$:
|
|
37
|
-
rgbTooltipColor
|
|
37
|
+
if (!rgbTooltipColor && !!$theme.colors?.[$theme.active]["dark"]["primary"]["300"])
|
|
38
|
+
rgbTooltipColor = $theme.colors?.[$theme.active]["dark"]["primary"]["300"];
|
|
38
39
|
$:
|
|
39
|
-
rgbTooltipBackgroundColor
|
|
40
|
+
if (!rgbTooltipBackgroundColor && !!$theme.colors?.[$theme.active]["dark"]["primary"]["900"])
|
|
41
|
+
rgbTooltipBackgroundColor = $theme.colors?.[$theme.active]["dark"]["primary"]["900"];
|
|
40
42
|
$:
|
|
41
|
-
rgbBackgroundColor
|
|
43
|
+
if (!rgbBackgroundColor && !!$theme.colors?.[$theme.active]["dark"]["background"]["200"])
|
|
44
|
+
rgbBackgroundColor = $theme.colors?.[$theme.active]["dark"]["background"]["200"];
|
|
42
45
|
$:
|
|
43
46
|
finalTooltipColor = !!rgbTooltipColor ? `rgb(${rgbTooltipColor}, .8)` : void 0;
|
|
44
47
|
$:
|
|
@@ -117,7 +120,8 @@ $:
|
|
|
117
120
|
},
|
|
118
121
|
ticks: {
|
|
119
122
|
display: showYTicks,
|
|
120
|
-
callback: xTickLabel
|
|
123
|
+
callback: xTickLabel,
|
|
124
|
+
stepSize: xTickStepSize
|
|
121
125
|
}
|
|
122
126
|
},
|
|
123
127
|
y: {
|
|
@@ -133,7 +137,8 @@ $:
|
|
|
133
137
|
},
|
|
134
138
|
ticks: {
|
|
135
139
|
display: showXTicks,
|
|
136
|
-
callback: yTickLabel
|
|
140
|
+
callback: yTickLabel,
|
|
141
|
+
stepSize: yTickStepSize
|
|
137
142
|
}
|
|
138
143
|
}
|
|
139
144
|
}
|
|
@@ -25,6 +25,11 @@ declare const __propDef: {
|
|
|
25
25
|
tooltipLabel?: ((tooltip: import("chart.js").TooltipItem<"bar">) => string) | undefined;
|
|
26
26
|
yTickLabel?: ((tickValue: string | number, index: number, ticks: any[]) => (string | number)) | undefined;
|
|
27
27
|
xTickLabel?: ((tickValue: string | number, index: number, ticks: any[]) => (string | number)) | undefined;
|
|
28
|
+
xTickStepSize?: number | undefined;
|
|
29
|
+
yTickStepSize?: number | undefined;
|
|
30
|
+
rgbTooltipColor?: string | undefined;
|
|
31
|
+
rgbTooltipBackgroundColor?: string | undefined;
|
|
32
|
+
rgbBackgroundColor?: string | undefined;
|
|
28
33
|
};
|
|
29
34
|
events: {
|
|
30
35
|
[evt: string]: CustomEvent<any>;
|