diff --git a/src/lib/components/EventTooltip.svelte b/src/lib/components/EventTooltip.svelte
index bc89408..2e49b1b 100644
--- a/src/lib/components/EventTooltip.svelte
+++ b/src/lib/components/EventTooltip.svelte
@@ -7,6 +7,8 @@
export let hoveredEventData;
export let width;
+ $: console.log(hoveredEventData)
+
.event-tooltip {
position: fixed;
- /*border: 1px solid #ccc;*/
background: rgba(255, 255, 255, 0.95);
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
padding: 5px;
diff --git a/src/lib/components/Legend.svelte b/src/lib/components/Legend.svelte
index cb7b831..8b11cb8 100644
--- a/src/lib/components/Legend.svelte
+++ b/src/lib/components/Legend.svelte
@@ -3,6 +3,10 @@
export let margins
export let radiusScale
export let opacityScale
+ export let tooltipX
+ export let tooltipY
+ export let hoveredLegendData
+ export let showLegendTooltip
$: minOpacity = opacityScale.domain()[0]
$: maxOpacity = opacityScale.domain()[1]
@@ -16,16 +20,39 @@
maxOpacity]
let height = 70
+
+ const tooltipContent = {
+ "breakout_scale": "Breakout Scale represents a range from Category One to Category Six. The smallest point on the visualization represents 'Not Applicable', indicating attributions which lack suitable evidence to justify a Breakout Scale classification.",
+ "attribution_score": "The opacity of attributions corresponds to the 18-point Attribution Score which attempts to qualify the credibility of an attribution."
+ }
+
+ function handleMouseOver(event, id) {
+ console.log(id)
+ showLegendTooltip = true;
+ tooltipX = event.clientX;
+ tooltipY = event.clientY;
+ hoveredLegendData = tooltipContent[id];
+ }
+ function handleMouseOut() {
+ showLegendTooltip = false;
+ }