site: fix formatMobile in chart examples (#5787)

pull/5824/head
kindoflew 4 years ago committed by GitHub
parent 945f741298
commit bf35353170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,7 +18,7 @@
let height = 200;
function formatMobile(tick) {
return "'" + tick % 100;
return "'" + tick.toString().slice(-2);
}
$: xScale = scaleLinear()

@ -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);
}
</script>

Loading…
Cancel
Save