appreciated/apexcharts-flow

Pie chart grows out of sight

Opened this issue · 0 comments

Describe the bug
Under certain conditions a pie chart slowly and constantly grows out of the browser window.

Steps or code example to Reproduce
Steps to reproduce the behavior:

  1. Checkout and run the example program from https://github.com/schweinchendick/apexchartbug
  2. Open the program in any browser (in a smaller window than full-size)
  3. Navigate to the "Pie Chart" demo page
  4. Resize the browser window to full size or full screen
  5. Watch the pie chart slowly grow

Expected behavior
The pie chart should keep the (relative) size to fit between the heading and footing of the demo page.
The bar chart - also found in the example program - keeps its size without growing.

Screenshots
N/A it would need to be a video, as it is dynamic.

Desktop:

  • OS: any, Ubuntu here
  • Browser any, Firefox here

Additional context
Newest Spring-Boot, Vaadin and apexcharts-flow

The problematic code is marked with FIXME (chart.setSizeFull()). If you set a fixed height of the pie chart, then it will not grow. But one does not know the height of the chart in advance. Therefore setSizeFull() is the only way to force the chart to fit between the header and footer. And it works for bar charts...