diff --git a/packages/pluggableWidgets/area-chart-web/CHANGELOG.md b/packages/pluggableWidgets/area-chart-web/CHANGELOG.md index 51cc6f0a39..09b7911891 100644 --- a/packages/pluggableWidgets/area-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/area-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Changed diff --git a/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md b/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md index 482886e036..9ecf58a574 100644 --- a/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Changed diff --git a/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md b/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md index a9cdfe0c0a..b77a009094 100644 --- a/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Changed diff --git a/packages/pluggableWidgets/column-chart-web/CHANGELOG.md b/packages/pluggableWidgets/column-chart-web/CHANGELOG.md index 87a8314a72..be6566a424 100644 --- a/packages/pluggableWidgets/column-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/column-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Changed diff --git a/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md b/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md index 870a698e66..f448e7c86d 100644 --- a/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Fixed diff --git a/packages/pluggableWidgets/line-chart-web/CHANGELOG.md b/packages/pluggableWidgets/line-chart-web/CHANGELOG.md index fc4fdb00a0..12bdb4f29b 100644 --- a/packages/pluggableWidgets/line-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/line-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Changed diff --git a/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md b/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md index 014c035684..42c168a09f 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Changed diff --git a/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md b/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md index 24cbd06650..5670f07398 100644 --- a/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- We fixed an issue where the chart in design mode overlapped other widgets on the page. The design mode preview now follows the configured width and height and stays within its parent. + ## [6.2.1] - 2025-07-15 ### Changed diff --git a/packages/shared/charts/src/components/ChartPreview.tsx b/packages/shared/charts/src/components/ChartPreview.tsx index 44b17af8fc..cab26a4531 100644 --- a/packages/shared/charts/src/components/ChartPreview.tsx +++ b/packages/shared/charts/src/components/ChartPreview.tsx @@ -1,8 +1,12 @@ -import { ComponentType, ReactElement, ReactNode } from "react"; +import { ComponentType, CSSProperties, ReactElement, ReactNode } from "react"; export interface ChartPreviewProps { class: string; showLegend: boolean; + widthUnit: "percentage" | "pixels"; + width: number | null; + heightUnit: "percentageOfWidth" | "pixels" | "percentageOfParent"; + height: number | null; playground: { widgetCount: number; renderer: ComponentType<{ children: ReactNode; caption?: string }> }; showPlaygroundSlot?: boolean; image: ReactNode; @@ -12,7 +16,7 @@ export interface ChartPreviewProps { export function ChartPreview(props: ChartPreviewProps): ReactElement { const { renderer: PlaygroundSlot } = props.playground ?? { renderer: () => null }; return ( -