Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ You can also check the

## Unreleased

- Features
- Added dynamic iframe resize support for LivingDocs
- Fix
- Clicking on Y axis title in bar charts now open Data tab in the details
panels, as in other chart types
Expand Down
26 changes: 20 additions & 6 deletions app/pages/embed/[chartId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Config as PrismaConfig } from "@prisma/client";
import "iframe-resizer/js/iframeResizer.contentWindow.js";
import { GetServerSideProps } from "next";
import ErrorPage from "next/error";
import Head from "next/head";
import Script from "next/script";

import { ChartPublished } from "@/components/chart-published";
import { useEmbedQueryParams } from "@/components/embed-params";
Expand Down Expand Up @@ -60,12 +62,24 @@ const EmbedPage = (props: PageProps) => {
} = props;

return (
<ConfiguratorStateProvider
chartId="published"
initialState={{ ...state, state: "PUBLISHED" }}
>
<ChartPublished configKey={key} embedParams={embedParams} />
</ConfiguratorStateProvider>
<>
<Head>
<meta
httpEquiv="Content-Security-Policy"
content="default-src 'self' 'unsafe-inline'; script-src 'unsafe-inline' 'self' https://cdn.jsdelivr.net/npm/@open-iframe-resizer/; style-src 'self' 'unsafe-inline';"
/>
</Head>
<Script
type="module"
src="https://cdn.jsdelivr.net/npm/@open-iframe-resizer/core@1.6.0/dist/index.js"
/>
<ConfiguratorStateProvider
chartId="published"
initialState={{ ...state, state: "PUBLISHED" }}
>
<ChartPublished configKey={key} embedParams={embedParams} />
</ConfiguratorStateProvider>
</>
);
};

Expand Down
1 change: 1 addition & 0 deletions app/themes/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ export const components: Components = {
font-family: "NotoSans";
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
scrollbar-gutter: stable;
}

* {
Expand Down
Loading