) {
const tooltipNode = tooltip ? (
) {
}}
>
{tooltip.text}
+ {tooltip.day ? (
+ open(tooltip.day as DateKey)} />
+ ) : null}
) : null;
diff --git a/src/components/insights/mood/mood-dimension-trends.tsx b/src/components/insights/mood/mood-dimension-trends.tsx
index bb20d8aff..52a860719 100644
--- a/src/components/insights/mood/mood-dimension-trends.tsx
+++ b/src/components/insights/mood/mood-dimension-trends.tsx
@@ -216,6 +216,7 @@ export function MoodDimensionTrends({
active
label={fmt.dateShortSmartCalendar(String(row.date))}
rows={rows}
+ action={chartDays.tooltipAction(chartData.indexOf(row))}
/>
);
}}
diff --git a/src/components/insights/sleep-stage-stacked-bar.tsx b/src/components/insights/sleep-stage-stacked-bar.tsx
index bd09ae618..ccf2e94c0 100644
--- a/src/components/insights/sleep-stage-stacked-bar.tsx
+++ b/src/components/insights/sleep-stage-stacked-bar.tsx
@@ -469,6 +469,7 @@ export function SleepStageStackedBar({ breakdown }: SleepStageStackedBarProps) {
const row = payload[0]?.payload as
Record | undefined;
const label = row?.label;
+ const rowIndex = row ? data.indexOf(row) : -1;
const napCount =
typeof row?.napCount === "number" ? row.napCount : 0;
// The footer's first line is the NIGHT. The nap is listed
@@ -549,6 +550,9 @@ export function SleepStageStackedBar({ breakdown }: SleepStageStackedBarProps) {
)}
)}
+ {chartDays.tooltipAction(
+ rowIndex === -1 ? undefined : rowIndex,
+ )}
);
}}
diff --git a/src/components/labs/lab-biomarker-chart.tsx b/src/components/labs/lab-biomarker-chart.tsx
index 97f78dcf8..7a8828340 100644
--- a/src/components/labs/lab-biomarker-chart.tsx
+++ b/src/components/labs/lab-biomarker-chart.tsx
@@ -406,6 +406,7 @@ export function LabBiomarkerChart({
active
label={labShortDate(point.timestamp)}
rows={rows}
+ action={chartDays.tooltipAction(points.indexOf(point))}
/>
);
}}
diff --git a/src/components/medications/detail/efficacy/efficacy-chart.tsx b/src/components/medications/detail/efficacy/efficacy-chart.tsx
index 36bab7d32..0d0307570 100644
--- a/src/components/medications/detail/efficacy/efficacy-chart.tsx
+++ b/src/components/medications/detail/efficacy/efficacy-chart.tsx
@@ -378,11 +378,18 @@ export function EfficacyChart({
color: item.color ?? "var(--chart-1)",
};
});
+ const index =
+ typeof x === "number"
+ ? displaySeries.findIndex((p) => p.t === x)
+ : -1;
return (
);
}}
diff --git a/src/components/medications/dose-strength-curve.tsx b/src/components/medications/dose-strength-curve.tsx
index 6040fb7c7..4b08d8082 100644
--- a/src/components/medications/dose-strength-curve.tsx
+++ b/src/components/medications/dose-strength-curve.tsx
@@ -326,6 +326,7 @@ export function DoseStrengthCurve({
active
label={fmt.dateShortSmart(new Date(point.t))}
rows={rows}
+ action={chartDays.tooltipAction(chartData.indexOf(point))}
/>
);
}}
diff --git a/src/components/mental-health/assessment-history-chart.tsx b/src/components/mental-health/assessment-history-chart.tsx
index 548b2165b..1cdf57adb 100644
--- a/src/components/mental-health/assessment-history-chart.tsx
+++ b/src/components/mental-health/assessment-history-chart.tsx
@@ -183,6 +183,7 @@ export function AssessmentHistoryChart({
active
label={fmt.dateShortSmart(new Date(point.timestamp))}
rows={rowsOut}
+ action={chartDays.tooltipAction(points.indexOf(point))}
/>
);
}}