From bf3535317038886b00e274b5225942a810f35158 Mon Sep 17 00:00:00 2001 From: kindoflew <70274722+kindoflew@users.noreply.github.com> Date: Thu, 24 Dec 2020 17:52:06 -0500 Subject: [PATCH] site: fix formatMobile in chart examples (#5787) --- site/content/examples/12-svg/02-bar-chart/App.svelte | 2 +- site/content/examples/12-svg/03-area-chart/App.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }