@likable-hair/svelte 3.1.31 → 3.1.32
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,7 +25,7 @@ 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;
|
|
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;
|
|
29
29
|
let mounted = false, zoomMounted = false;
|
|
30
30
|
onMount(() => {
|
|
31
31
|
mounted = true;
|
|
@@ -78,6 +78,9 @@ $:
|
|
|
78
78
|
bodyFont: {
|
|
79
79
|
size: 14,
|
|
80
80
|
weight: "bold"
|
|
81
|
+
},
|
|
82
|
+
callbacks: {
|
|
83
|
+
label: tooltipLabel
|
|
81
84
|
}
|
|
82
85
|
},
|
|
83
86
|
legend: {
|
|
@@ -113,7 +116,8 @@ $:
|
|
|
113
116
|
display: false
|
|
114
117
|
},
|
|
115
118
|
ticks: {
|
|
116
|
-
display: showYTicks
|
|
119
|
+
display: showYTicks,
|
|
120
|
+
callback: xTickLabel
|
|
117
121
|
}
|
|
118
122
|
},
|
|
119
123
|
y: {
|
|
@@ -128,7 +132,8 @@ $:
|
|
|
128
132
|
display: false
|
|
129
133
|
},
|
|
130
134
|
ticks: {
|
|
131
|
-
display: showXTicks
|
|
135
|
+
display: showXTicks,
|
|
136
|
+
callback: yTickLabel
|
|
132
137
|
}
|
|
133
138
|
}
|
|
134
139
|
}
|
|
@@ -22,6 +22,9 @@ declare const __propDef: {
|
|
|
22
22
|
lineWidth?: number | undefined;
|
|
23
23
|
enableZoom?: boolean | undefined;
|
|
24
24
|
resetZoom?: boolean | undefined;
|
|
25
|
+
tooltipLabel?: ((tooltip: import("chart.js").TooltipItem<"bar">) => string) | undefined;
|
|
26
|
+
yTickLabel?: ((tickValue: string | number, index: number, ticks: any[]) => (string | number)) | undefined;
|
|
27
|
+
xTickLabel?: ((tickValue: string | number, index: number, ticks: any[]) => (string | number)) | undefined;
|
|
25
28
|
};
|
|
26
29
|
events: {
|
|
27
30
|
[evt: string]: CustomEvent<any>;
|