swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.29k stars 1.15k forks source link

Not Responsive inside angular material tabs #1454

Open ShivPandey opened 4 years ago

ShivPandey commented 4 years ago

Describe the bug Not behaving Responsive inside angular material tabs

arjundvr commented 4 years ago

Try alternative approach meanwhile <mat-tab-group #tabs> <mat-tab label="Tab 1" #firstTab> <mat-tab label="Tab 2" #secondTab> < /mat-tab-group> < div [hidden]="!firstTab.isActive"> ngx chart 1 < /div> < div [hidden]="!secondTab.isActive"> ngx chart 2 < /div>

zachgoll commented 4 years ago

Any solution to this? The one above doesn't work for my case because my tabs have nested components that have graphs in each. It looks like the <rect></rect> component within the graph incorrectly sets the width and height when it is within an Angular Material tab.

ShivPandey commented 4 years ago

Do one thing user tabs as a router then use ngx chart its working fine