diff --git a/components/paths/graphs/DataTable.tsx b/components/paths/graphs/DataTable.tsx index 58ba4aa9..987bf33b 100644 --- a/components/paths/graphs/DataTable.tsx +++ b/components/paths/graphs/DataTable.tsx @@ -13,6 +13,7 @@ interface DataTableProps { endYear: number; separateYears?: number[]; goalName?: string; + disclaimer?: string; } const TableWrapper = Styled.div` @@ -29,7 +30,15 @@ const TableWrapper = Styled.div` `; const DataTable = (props: DataTableProps) => { - const { node, subNodes, startYear, endYear, separateYears, goalName } = props; + const { + node, + subNodes, + startYear, + endYear, + separateYears, + goalName, + disclaimer, + } = props; const t = useTranslations(); const totalHistoricalValues = node.metric.historicalValues.filter((value) => separateYears @@ -79,6 +88,7 @@ const DataTable = (props: DataTableProps) => { {separateYears ? '' : ` (${startYear} - ${endYear})`}
{t('table-year')} | diff --git a/components/paths/graphs/DimensionalNodePlot.tsx b/components/paths/graphs/DimensionalNodePlot.tsx index 739db37a..97e76129 100644 --- a/components/paths/graphs/DimensionalNodePlot.tsx +++ b/components/paths/graphs/DimensionalNodePlot.tsx @@ -53,6 +53,13 @@ const Tools = styled.div` } `; +const Disclaimer = styled.p` + margin-right: 1.25rem; + font-size: ${({ theme }) => theme.fontSizeSm}; + color: ${({ theme }) => theme.textColor.secondary}; + text-align: right; +`; + function formatHover( name: string, color: string, @@ -159,6 +166,7 @@ type DimensionalNodePlotProps = { color?: string | null; withControls?: boolean; withTools?: boolean; + disclaimer?: string; }; export default function DimensionalNodePlot({ @@ -170,6 +178,7 @@ export default function DimensionalNodePlot({ withTools = true, endYear, baselineForecast, + disclaimer, }: DimensionalNodePlotProps) { const t = useTranslations(); const activeGoal = useReactiveVar(activeGoalVar); @@ -179,6 +188,7 @@ export default function DimensionalNodePlot({ : null; const cube = useMemo(() => new DimensionalMetric(metric), [metric]); + console.log('plot cube', cube); const lastMetricYear = metric.years.slice(-1)[0]; const usableEndYear = lastMetricYear && endYear > lastMetricYear ? lastMetricYear : endYear; @@ -793,6 +803,7 @@ export default function DimensionalNodePlot({ config={plotConfig} debug={true} /> + {disclaimer &&
---|