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