We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c58196c commit 02688d2Copy full SHA for 02688d2
src/lib/components/data-vis/line-chart/LineChart.svelte
@@ -17,8 +17,8 @@
17
lineFunction,
18
lineClicked,
19
lineHovered,
20
- labelClicked = $bindable(),
21
- labelHovered = $bindable(),
+ labelClicked,
+ labelHovered,
22
svgWidth = $bindable(500),
23
activeMarkerId,
24
onClickLine,
@@ -47,6 +47,7 @@
47
series,
48
y,
49
x,
50
+ seriesLabels = $bindable(),
51
} = $props();
52
53
let chartWidth = $derived(svgWidth - paddingLeft - paddingRight);
@@ -125,6 +126,12 @@
125
126
return acc;
127
}, {}),
128
);
129
+
130
+ function hasShowLabel(objOfArrays) {
131
+ return Object.values(objOfArrays).some((array) =>
132
+ array.some((obj) => obj.showLabel === true),
133
+ );
134
+ }
135
</script>
136
137
<div bind:clientWidth={svgWidth}>
0 commit comments