Ngx-charts: Chart responsiveness cannot shrink in flexbox

Created on 3 Sep 2019  路  2Comments  路  Source: swimlane/ngx-charts

Describe the bug
The responsive layout of the chart cannot shrink when the parent element is a flexbox, it can only grow to the size of the window.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://ngxchart-flexbox-issue.stackblitz.io
  2. Resize the window to make it smaller
  3. Reload page
  4. Resize the window to make it larger

Expected behavior
The chart should resize within its container accordingly when made larger or smaller.

Demo
https://stackblitz.com/edit/ngxchart-flexbox-issue

ngx-charts version
12.0.1

Bug

Most helpful comment

Hello @andrewv86,

I think you should check marjan comment at #451 as workaround.

Cheers!

EDIT: I just saved you some time: forked flexbox issue demo.

All 2 comments

Hello @andrewv86,

I think you should check marjan comment at #451 as workaround.

Cheers!

EDIT: I just saved you some time: forked flexbox issue demo.

Hello @andrewv86,

I think you should check marjan comment at #451 as workaround.

Cheers!

EDIT: I just saved you some time: forked flexbox issue demo.

Perfect! Thank you very much, closing this now.

Was this page helpful?
0 / 5 - 0 ratings