Attribution score and date range filter values
Этот коммит содержится в:
родитель
dca26bd54d
Коммит
6041ebaedb
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { utcFormat } from 'd3-time-format';
|
import { utcFormat } from 'd3-time-format';
|
||||||
export let cases
|
export let cases;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
@ -13,6 +13,7 @@
|
|||||||
<td>Source</td>
|
<td>Source</td>
|
||||||
<td>Source category</td>
|
<td>Source category</td>
|
||||||
<td>Actor nation</td>
|
<td>Actor nation</td>
|
||||||
|
<td>Campaign</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -24,9 +25,16 @@
|
|||||||
<td>{utcFormat('%B %d, %Y')(new Date(attrCase.attribution_date))}</td>
|
<td>{utcFormat('%B %d, %Y')(new Date(attrCase.attribution_date))}</td>
|
||||||
<td>{attrCase.source}</td>
|
<td>{attrCase.source}</td>
|
||||||
<td>{attrCase.source_category}</td>
|
<td>{attrCase.source_category}</td>
|
||||||
<td>{#each attrCase.actor_nation as nation, i}
|
<td
|
||||||
{attrCase.actor_nation.length != (i + 1) ? nation + ', ' : nation}
|
>{#each attrCase.actor_nation as nation, i}
|
||||||
{/each}</td>
|
{attrCase.actor_nation.length != i + 1 ? nation + ', ' : nation}
|
||||||
|
{/each}</td
|
||||||
|
>
|
||||||
|
<td>
|
||||||
|
{#each attrCase.campaign as camp, i}
|
||||||
|
{attrCase.campaign.length != i + 1 ? camp + ', ' : camp}
|
||||||
|
{/each}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
@ -43,4 +51,3 @@
|
|||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
import DateRangeSlider from '$lib/components/DateRangeSlider.svelte';
|
import DateRangeSlider from '$lib/components/DateRangeSlider.svelte';
|
||||||
import SearchText from '$lib/components/SearchText.svelte';
|
import SearchText from '$lib/components/SearchText.svelte';
|
||||||
import Share from '$lib/components/Share.svelte';
|
import Share from '$lib/components/Share.svelte';
|
||||||
|
import { utcFormat } from 'd3-time-format';
|
||||||
//import { attributionScoreScale } from '../../stores/scales';
|
//import { attributionScoreScale } from '../../stores/scales';
|
||||||
import {
|
import {
|
||||||
platformFilter,
|
platformFilter,
|
||||||
@ -21,7 +22,7 @@
|
|||||||
defaultTimeRange
|
defaultTimeRange
|
||||||
} from '../../stores/filters';
|
} from '../../stores/filters';
|
||||||
|
|
||||||
//$: console.log($timeRangeFilter)
|
const timeFormat = utcFormat('%m/%d/%y')
|
||||||
|
|
||||||
export let cases;
|
export let cases;
|
||||||
|
|
||||||
@ -71,7 +72,7 @@
|
|||||||
/>
|
/>
|
||||||
<Slider
|
<Slider
|
||||||
value={$attributionScoreFilter}
|
value={$attributionScoreFilter}
|
||||||
label="Attribution Score"
|
label={`Attribution Score: ${$attributionScoreFilter[0]} - ${$attributionScoreFilter[1]}`}
|
||||||
min={attributionScoreDef[0]}
|
min={attributionScoreDef[0]}
|
||||||
max={attributionScoreDef[1]}
|
max={attributionScoreDef[1]}
|
||||||
showHandleLabels={false}
|
showHandleLabels={false}
|
||||||
@ -117,7 +118,7 @@
|
|||||||
></Dropdown>
|
></Dropdown>
|
||||||
<DateRangeSlider
|
<DateRangeSlider
|
||||||
value={timeDummyRange}
|
value={timeDummyRange}
|
||||||
label="Date Range"
|
label={`Date Range: ${timeFormat($timeRangeFilter[0])} - ${timeFormat($timeRangeFilter[1])}`}
|
||||||
min={0}
|
min={0}
|
||||||
max={10}
|
max={10}
|
||||||
showHandleLabels={false}
|
showHandleLabels={false}
|
||||||
|
|||||||
Загрузка…
x
Ссылка в новой задаче
Block a user