diff --git a/adminSiteClient/ChartViewIndexPage.tsx b/adminSiteClient/ChartViewIndexPage.tsx index 267bd50c10..7b145cecca 100644 --- a/adminSiteClient/ChartViewIndexPage.tsx +++ b/adminSiteClient/ChartViewIndexPage.tsx @@ -6,7 +6,7 @@ import { AdminAppContext } from "./AdminAppContext.js" import { Timeago } from "./Forms.js" import { ColumnsType } from "antd/es/table/InternalTable.js" import { ApiChartViewOverview } from "../adminShared/AdminTypes.js" -import { BAKED_GRAPHER_URL } from "../settings/clientSettings.js" +import { GRAPHER_DYNAMIC_THUMBNAIL_URL } from "../settings/clientSettings.js" import { Link } from "./Link.js" import { buildSearchWordsFromSearchString, @@ -27,7 +27,7 @@ function createColumns( width: 200, render: (chartConfigId) => ( ), diff --git a/site/gdocs/components/NarrativeChart.tsx b/site/gdocs/components/NarrativeChart.tsx index 68d14e7be8..41e436e069 100644 --- a/site/gdocs/components/NarrativeChart.tsx +++ b/site/gdocs/components/NarrativeChart.tsx @@ -6,7 +6,18 @@ import cx from "classnames" import { GRAPHER_PREVIEW_CLASS } from "../../SiteConstants.js" import { BlockErrorFallback } from "./BlockErrorBoundary.js" import { DocumentContext } from "../OwidGdoc.js" -import { GRAPHER_CHART_VIEW_EMBEDDED_FIGURE_CONFIG_ATTR } from "@ourworldindata/grapher" +import { + DEFAULT_GRAPHER_HEIGHT, + DEFAULT_GRAPHER_WIDTH, + GRAPHER_CHART_VIEW_EMBEDDED_FIGURE_CONFIG_ATTR, +} from "@ourworldindata/grapher" +import { + BAKED_GRAPHER_URL, + GRAPHER_DYNAMIC_THUMBNAIL_URL, +} from "../../../settings/clientSettings.js" +import { queryParamsToStr } from "@ourworldindata/utils" +import GrapherImage from "../../GrapherImage.js" +import InteractionNotice from "../../InteractionNotice.js" export default function NarrativeChart({ d, @@ -40,6 +51,10 @@ export default function NarrativeChart({ const metadataStringified = JSON.stringify(viewMetadata) + const resolvedUrl = `${BAKED_GRAPHER_URL}/${viewMetadata.parentChartSlug}${queryParamsToStr( + viewMetadata.queryParamsForParentChart + )}` + return (