Skip to content

Commit a064ee2

Browse files
committed
Update PositionChart.svelte
1 parent 50d50ee commit a064ee2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/lib/components/data-vis/position-chart/PositionChart.svelte

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
chartHeight = 24,
1414
} = $props();
1515
16+
$inspect(value, "value");
17+
1618
const range = Array.from({ length: 10 }, (_, i) => i);
1719
1820
// the 'chart' is the bar and the marker - its height is a prop and its width is binded to clientWidth
@@ -79,10 +81,15 @@
7981
{:else}
8082
{#each value as rowValue, i}
8183
<g
82-
transform="translate({xFunction(rowValue) +
84+
transform="translate({xFunction(rowValue.data) +
8385
markerRadius},{chartHeight / 2})"
8486
>
85-
<circle r={markerRadius} cx="0" cy="0" fill="#CA357C" stroke="white"
87+
<circle
88+
r={markerRadius}
89+
cx="0"
90+
cy="0"
91+
fill={rowValue.color}
92+
stroke="white"
8693
></circle>
8794
</g>
8895
{/each}

0 commit comments

Comments
 (0)