We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Legend Wrap (OverflowMode) on WPF SfCharts

Thread ID:

Created:

Updated:

Platform:

Replies:

143228 Mar 10,2019 10:23 PM UTC Mar 12,2019 03:57 AM UTC WPF 3
loading
Tags: SfChart
Carlos Fernando Consigli
Asked On March 10, 2019 10:23 PM UTC

I've noticed that in Xamarin platform you have an option to wrap legends ( https://help.syncfusion.com/xamarin/sfchart/legend#legend-wrap ).
I couldn't find that option on WPF. Is there a way to do the equivalent to OverflowMode="Wrap" in WPF Charts?
Thanks in advance

Muneesh Kumar G [Syncfusion]
Replied On March 11, 2019 06:41 AM UTC

Hi Carlos, 
 
Greetings from Syncfusion.  
 
We have analyzed your and we would like to inform you that when there is more number of legends, the legend exceeds the chart will be cropped, as it arranged horizontally.  
 
To avoid the cropping, we can change the existing arrangement layout (one which arrange each legend items horizontally) using ItemsPanel property as in below code snippet: 
 
Code snippet 
<syncfusion:SfChart x:Name="chart"> 
 
    <syncfusion:SfChart.Resources> 
 
        <ItemsPanelTemplate x:Key="itemPanelTemplate"> 
 
             <WrapPanel/> 
 
        </ItemsPanelTemplate> 
                 
    </syncfusion:SfChart.Resources> 
 
    <syncfusion:SfChart.Legend> 
 
            <syncfusion:ChartLegend ItemsPanel="{StaticResource itemPanelTemplate}"/> 
 
    </syncfusion:SfChart.Legend> 
 
 </syncfusion:SfChart> 
 
Screenshot: 
 
 
 
Hope it helps you.  
   
Thanks, 
Muneesh Kumar G.  
 


Carlos Fernando Consigli
Replied On March 11, 2019 01:27 PM UTC

Excellent, thanks. It worked perfectly.

Muneesh Kumar G [Syncfusion]
Replied On March 12, 2019 03:57 AM UTC

Hi Carlos,  
 
Thanks for the update. 
  
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
 
Thanks, 
Muneesh Kumar G.  
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;