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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Legend for large number of series decreases the size of actual chart

Thread ID:

Created:

Updated:

Platform:

Replies:

127951 Dec 21,2016 01:51 AM UTC Dec 22,2016 03:58 AM UTC UWP 3
loading
Tags: SfChart
Syaiful Nizam Yahya
Asked On December 21, 2016 01:51 AM UTC

I have a chart with lots of series. Unfortunately, the series legend reduces the chart height to the point it unuseable.

See below.

Series legend overide chart height

What can I do to fix that? Can I fixed the chart height and allow dynamic height for legends?

Thanks.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 21, 2016 11:01 AM UTC

Hi Syaiful, 
  
Thanks for contacting Syncfusion Support. 
  
We have analyzed the reported problem and it can be avoided by applying Template for chart legend and chart legend panel as like the below code snippet, 
          <chart:SfChart.Legend> 
                <chart:ChartLegend > 
                     <chart:ChartLegend.ItemsPanel> 
                        <ItemsPanelTemplate> 
                            <ItemsWrapGrid   Orientation="Horizontal"/> 
                        </ItemsPanelTemplate> 
                     </chart:ChartLegend.ItemsPanel> 
                    <chart:ChartLegend.Template> 
                        <ControlTemplate> 
                            <ScrollViewer Margin="10" Height="100"             
                                          HorizontalScrollMode="Enabled" 
                                          HorizontalScrollBarVisibility="Visible"  
                                          VerticalScrollBarVisibility="Visible"   
                                          VerticalScrollMode="Enabled"> 
                                <ItemsPresenter/> 
                            </ScrollViewer> 
                        </ControlTemplate> 
                    </chart:ChartLegend.Template> 
                </chart:ChartLegend> 
          </chart:SfChart.Legend> 
  
We have prepared a demo sample based on your requirement and it can be downloaded from below link, 
  
Sample: LegendUWP 
  
Please refer our UG documentation link to know more about the chart legend template, 
  
Regards, 
Devi 
  




Syaiful Nizam Yahya
Replied On December 21, 2016 11:21 AM UTC

Thank you so much! That really helps!

+1

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 22, 2016 03:58 AM UTC

Hi Syaiful, 
  
Thanks for your update. 
  
Please let us know, if you need any further assistance on this. 
  
Regards, 
Devi 


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.

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

;