diff --git a/site/content/examples/12-svg/02-bar-chart/App.svelte b/site/content/examples/12-svg/02-bar-chart/App.svelte index b9002bcaea..30c374b67e 100644 --- a/site/content/examples/12-svg/02-bar-chart/App.svelte +++ b/site/content/examples/12-svg/02-bar-chart/App.svelte @@ -18,7 +18,7 @@ let height = 200; function formatMobile(tick) { - return "'" + tick % 100; + return "'" + tick.toString().slice(-2); } $: xScale = scaleLinear() diff --git a/site/content/examples/12-svg/03-area-chart/App.svelte b/site/content/examples/12-svg/03-area-chart/App.svelte index 6aec5943dc..98ff070411 100644 --- a/site/content/examples/12-svg/03-area-chart/App.svelte +++ b/site/content/examples/12-svg/03-area-chart/App.svelte @@ -23,7 +23,7 @@ $: area = `${path}L${xScale(maxX)},${yScale(0)}L${xScale(minX)},${yScale(0)}Z`; function formatMobile (tick) { - return "'" + tick % 100; + return "'" + tick.toString().slice(-2); }