diff --git a/src/blocks/HistoryLineTooltip.svelte b/src/blocks/HistoryLineTooltip.svelte index 87fb4b40..5d53e3ea 100644 --- a/src/blocks/HistoryLineTooltip.svelte +++ b/src/blocks/HistoryLineTooltip.svelte @@ -18,6 +18,8 @@ */ export let sensor; + export let prop = 'displayName'; + $: items = item && view ? view.data('values').filter((d) => d.time_value === item.time_value) : []; @@ -26,7 +28,7 @@ {#each items as i} - + diff --git a/src/blocks/SensorsLineTooltip.svelte b/src/blocks/SensorsLineTooltip.svelte new file mode 100644 index 00000000..acbfb07b --- /dev/null +++ b/src/blocks/SensorsLineTooltip.svelte @@ -0,0 +1,58 @@ + + +
+
{formatDateShortDayOfWeekAbbr(item.date_value)}
+
{i.displayName}{i[prop]}
+ {#each items as i, index} + + + + + {/each} +
{i[prop]} + +
+ + + diff --git a/src/components/RegionSearch.svelte b/src/components/RegionSearch.svelte index 7adf6629..efb88503 100644 --- a/src/components/RegionSearch.svelte +++ b/src/components/RegionSearch.svelte @@ -27,11 +27,13 @@ selectOnClick {selectedItem} {selectedItems} + clear={selectedItems == null} labelFieldName="displayName" keywordFunction={combineKeywords} maxItemsToShowInList={15} on:change on:add + on:remove > diff --git a/src/components/Search.svelte b/src/components/Search.svelte index 416fb65f..db3a5e16 100644 --- a/src/components/Search.svelte +++ b/src/components/Search.svelte @@ -334,6 +334,7 @@ /> {#if clear}