From ccbd22d93630c9120d7676ef372e8512283638bb Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 2 Mar 2019 17:27:10 -0500 Subject: [PATCH] tidy up some examples --- site/content/examples/bar-chart/App.svelte | 9 ++------- .../examples/binding-media-elements/App.svelte | 3 +-- site/content/examples/line-chart/App.svelte | 7 ------- .../content/examples/scatterplot/Scatterplot.svelte | 13 ++++++------- site/content/examples/svg-clock/App.svelte | 13 +++++-------- 5 files changed, 14 insertions(+), 31 deletions(-) diff --git a/site/content/examples/bar-chart/App.svelte b/site/content/examples/bar-chart/App.svelte index 82af1834a8..a4b01f97dd 100644 --- a/site/content/examples/bar-chart/App.svelte +++ b/site/content/examples/bar-chart/App.svelte @@ -9,9 +9,6 @@ let width = 500; let height = 200; - let barWidth; - let xScale; - let yScale; function formatMobile(tick) { return "'" + tick % 100; @@ -25,10 +22,8 @@ .domain([0, Math.max.apply(null, yTicks)]) .range([height - padding.bottom, padding.top]); - $: { - const innerWidth = width - (padding.left + padding.right); - barWidth = innerWidth / xTicks.length; - } + $: innerWidth = width - (padding.left + padding.right); + $: barWidth = innerWidth / xTicks.length;