Pivot chart width does not behave when on tab control

Hello

I have a pivot table / chart on a tab control.  The tab control has the property LoadOn="ContentLoad.Init"

In the attached example if you do the following you will see the issue:

1. Run the sample
2. Goto pivot table tab
3. Note pivot table row labels are not actually displayed (annoying but I can work around)
4. Switch to chart view and the width of the chart shrinks dramaticallty

I have found that the chart width can misbehave in multiple scenarios.

Any ideas.


Thanks

Attachment: SyncfusionTroubleshoot_32d7e273.zip

5 Replies 1 reply marked as answer

SS Saranya Sivan Syncfusion Team March 15, 2021 05:39 PM UTC

Hi Richard, 
  
We considered “Alignment issue in pivot chart when it is inside a tab” as a bug and logged a defect report in our data base. And it will be available in weekly patch release which is estimated to be rolled in the end of April, 2021. 
  
You can track the task in the following link. 
  
  
We appreciate your patience until then. 
  
Regards, 
Saranya Sivan. 




DI Ditchford March 17, 2021 05:00 AM UTC

Hello

Is there a way to reset the chart width to 100% via a button when this happens (without reloading the page). This means that I can at least tell the user to press the refresh button if the chart width misbehaves.

Thank you.


SS Saranya Sivan Syncfusion Team March 18, 2021 01:07 PM UTC

Hi Richard, 
  
Kindly set the `LoadOn` property in SfTab tag to "ContentLoad.Demand" to avoid this issue. Meanwhile, we have prepared a sample for your reference. Please find the sample below, 
  
Code Snippet: 
  
<SfTab LoadOn="ContentLoad.Demand"> 
            <TabEvents></TabEvents> 
</SfTab> 
  
   
Please let us know if you have concerns. 
   
Regards,  
Saranya.  



DI Ditchford March 19, 2021 12:38 AM UTC

Hello

Thanks, already tried that.  The problem just moves elsewhere when you do that.  So in the sample that you adjusted, try this:

1. Goto Pivot table, switch to chart view
2. Goto Download tab and press "Download Something"
3. Switch back to Pivot tab and the chart width is compressed.

There are many scenarios where this happens, so its something suss with chart view as I have never seen it happen to the table view.

Thanks


SS Saranya Sivan Syncfusion Team March 19, 2021 04:47 PM UTC

Hi Richard,    
We have checked all the possibilities to provide the work around for the reported issue in sample level. To avoid the reported issue kindly set the `LoadOn` property in SfTab tag to "ContentLoad.Dynamic" to avoid this issue. Meanwhile, we have prepared a sample for your reference. Please find the sample below,  
Note: The `ContentLoad.Dynamic` type will create new tab. So, the component will refresh while switching from one tab to another. 
Code Snippet:   
<SfTab LoadOn="ContentLoad.Dynamic">  
            <TabEvents></TabEvents>  
</SfTab>  
  
Please let us know if you have concerns.     
Regards,   
Saranya. 
 


Marked as answer
Loader.
Up arrow icon