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