100% width does not work

If I set the chart like that:
<SfStockChart @ref="chart" ID="tSChart" Title="" Theme="ChartTheme.Bootstrap4" EnablePeriodSelector="false" EnableSelector="true" Height="200" Width="100%">

and this is inside a control which will initially be smaller - then scale up - the chart will not scale as well, but it will remain the initial static size.

8 Replies 1 reply marked as answer

SM Srihari Muthukaruppan Syncfusion Team December 14, 2020 05:48 AM UTC

Hi Yordan, 
 
We have analyzed your query. From that, we would like to let you know that the chart is responsive with respect to the width and height of its parent element, if its zero, then it will render with its default size(600 * 450). we suggest you to use the below workaround solution to achieve your requirement. In that we have modified the style of chart and accumulation chart using class name to achieve your requirement. Please find below code snippet and screenshot.  
 
Code Snippet: 
    .e-chart { 
        height: inherit !important; 
    } 
    .e-accumulationchart{ 
        height: inherit !important; 
    } 
 
Screenshot: 
 
 
If you still face this issue. kindly revert us with the following information which will be more helpful for further analysis and provide you the solution sooner.      
  1. Please share the runnable sample.
  2. Share the details if you have done any other customization in your sample.
 
Regards, 
Srihari 



YO Yordan December 14, 2020 12:17 PM UTC

I am not sure what I have to do. I've pasted the sniped in my main css, but nothing have changed. The issue remains.


YO Yordan December 14, 2020 07:54 PM UTC

Update: Seems like Your code working, but something have to trigger the resize in some cases.
The bad news is that this thing is doing hell of recalculations and redraw when this event occur.


SM Srihari Muthukaruppan Syncfusion Team December 15, 2020 03:20 PM UTC

Hi Yordan, 
 
We have analysed your query. From that we would like to let you know on resize we have destroyed the chart svg and rendered the chart. If you would like to disable animation effect we suggest you to use enableAnimation property in the chart or animation property in the series to overcome the reported scenario. 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M  



YO Yordan December 15, 2020 04:00 PM UTC

Destroying the graphic for highly filled charts is something which should not occurring on resize, since I have 8 series by 25.000 points each.
Try to see how this going with resize - when screen orientation occurs on mobile device..
( I very believe that SVG is outdated bad format, and everything should go OpenGL )


SM Srihari Muthukaruppan Syncfusion Team December 17, 2020 02:25 PM UTC

Hi Yordan, 
 
We have analysed your query. From that, we would like to let you know that as of now we don't have the support to achieve your requirement. We have already considered a scenario as an improvement and logged a feature request through which your requirement can be achieved. You can keep track of the feature from the feedback portal below. 
 
    
The fix will be available in any of our releases. Please cast your vote to make it count. We will prioritize the features of every release based on the demands.    
 
Regards, 
Srihari M 


Marked as answer

YO Yordan December 17, 2020 09:33 PM UTC

Thank You dear Syncfusion support. 


SM Srihari Muthukaruppan Syncfusion Team December 18, 2020 05:50 AM UTC

Hi Yordan,  
 
Most welcome. Kindly get in touch with us, if you requires further assistance. We are always happy in assisting you.   
   
Thanks,   
Srihari 


Loader.
Up arrow icon