Skip to content

Commit

Permalink
fix: keep original item height to avoid PT not showing up (DHIS2-16888)
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Feb 28, 2024
1 parent b93c842 commit 16684e5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/plugin/src/VisualizationPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ export const VisualizationPlugin = ({
}
: style

// force height when no value available otherwise the PivotTable container sets 0 as height hiding the table content
// and Highcharts does not render correctly the chart/legend
if (!transformedStyle.height) {
transformedStyle.height = '100%'
}

const getLegendKey = () => {
if (hasLegendSet && forDashboard) {
return (
Expand Down Expand Up @@ -330,8 +336,7 @@ export const VisualizationPlugin = ({
onDrill ? onToggleContextualMenu : undefined
}
id={id}
// force height otherwise the PivotTable container sets 0 as height hiding the table content
style={{ ...transformedStyle, height: '100%' }}
style={transformedStyle}
/>
) : (
<ChartPlugin
Expand Down

0 comments on commit 16684e5

Please sign in to comment.