Width value is not applied by chart control

Hi.

We have a problem with the resize of this control. We are trying to use a stacked bar 100% but the graph gets out of picture because it has a fixed size of 600px even if we are setting the width specifying a percentage

This is what we get:

 

imagen

This is what we see in the console:

imagen

It doesn’t matter what size we give the screen, we always have 600 as width.

 

This is our code

imagen

Even if we change the width to 60%, the width remains 600px, unlike when we set a fixed value, in which case the value is applied correctly.

In addition, we have tried to wait until our screen is fully rendered to load the chart but the problem still continues.

 

When we play around with your example ( https://ej2.syncfusion.com/vue/demos/#/bootstrap5/chart/stacked-bar-100.html), the width changes when we go to mobilemode.

 

What can be happening?

 

Thank you in advance for your answer .

Regards

Gaspar


3 Replies

SB Swetha Babu Syncfusion Team March 21, 2022 01:23 PM UTC

Hi Gaspar, 

Greetings from Syncfusion. 

We are unable to reproduce the reported scenario. From the provided code snippet, we came to know that you have used the single quote(‘’) in the width property. Use only the double quote(“”) in the width property of  the Chart component. Please find the below cod snippet for the same. 

Code Snippet: 

<ej2-charts :width=”100%”></ejs-charts> 


If the reported scenario still persists, please let us know the package version that you are using and the browser that reproduces the reported scenario. 

Kindly, revert us if you have any concerns. 

Regards, 
Swetha


GB Gaspar Blein March 23, 2022 03:12 PM UTC

Hi Swetha,


Thank you for your response. We are going to try your suggestion


Regards 

Gaspar



DG Durga Gopalakrishnan Syncfusion Team March 24, 2022 10:51 AM UTC

Hi Gasper,


Most welcome. Please ensure from your end and update us details if you face any difficulties.


Regards,

Durga G.


Loader.
Up arrow icon