Fix timeline bug
Этот коммит содержится в:
родитель
cb19c26b9f
Коммит
e738f54cb9
@ -15,11 +15,14 @@
|
|||||||
let width
|
let width
|
||||||
let height = 120
|
let height = 120
|
||||||
|
|
||||||
cases.forEach(d => d.attribution_date = new Date(d.attribution_date))
|
//cases.forEach(d => d.attribution_date = new Date(d.attribution_date))
|
||||||
|
|
||||||
$: xScale = scaleUtc(extent(cases.map(d => d.attribution_date)), [0, width - margins.right - margins.left])
|
$: dateExtent = extent(cases.map(d => new Date(d.attribution_date)))
|
||||||
|
|
||||||
|
$: xScale = scaleUtc(dateExtent, [0, width - margins.right - margins.left])
|
||||||
$: ticks = xScale.ticks(5)
|
$: ticks = xScale.ticks(5)
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="timeline-container" bind:clientWidth={width}>
|
<div class="timeline-container" bind:clientWidth={width}>
|
||||||
@ -51,7 +54,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
{#each cases as attrCase}
|
{#each cases as attrCase}
|
||||||
<circle
|
<circle
|
||||||
cx={xScale(attrCase.attribution_date)}
|
cx={xScale(new Date(attrCase.attribution_date))}
|
||||||
cy={0}
|
cy={0}
|
||||||
r={6}
|
r={6}
|
||||||
fill={'#000000'}
|
fill={'#000000'}
|
||||||
|
|||||||
Загрузка…
x
Ссылка в новой задаче
Block a user