diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b83ea2cc..305ff908d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Class distribution bar chart: tooltip was clipped when hovering a chart with a single class. - Long tags shown in the left side menu are truncated. ### Security diff --git a/lightly_studio_view/src/lib/components/BarChart/buildEchartsOption.ts b/lightly_studio_view/src/lib/components/BarChart/buildEchartsOption.ts index c9ae91f98..fb344099b 100644 --- a/lightly_studio_view/src/lib/components/BarChart/buildEchartsOption.ts +++ b/lightly_studio_view/src/lib/components/BarChart/buildEchartsOption.ts @@ -73,6 +73,7 @@ export function buildEchartsOption( tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' }, + appendTo: 'body', formatter: (params: { name: string; value: number }[]) => { const [{ name, value }] = params; const percent = totalCount > 0 ? ` (${formatPercent(value / totalCount)})` : '';