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

ChartLegend Wrap Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

116029 Mar 19,2014 06:44 PM UTC Mar 21,2014 09:33 AM UTC WinRT 4
loading
Tags: SfChart
Pseudocode
Asked On March 19, 2014 06:44 PM UTC

Hi !

I create a PieSeries Chart with a ChartLegend.
There are a lot of Items in the ChartLegend.
How can i make the ChartLegend scrollable, if the items not fit in the WrapGrid?

Fixed PieSeries Chart and scrollable ChartLegend?

Thanks



Karthikeyan V [Syncfusion]
Replied On March 20, 2014 07:29 AM UTC

Hi Christof,

Thanks for using Syncfusion products.

We have analyzed the reported query. You can achieve your requirement by applying the below code snippet.

Code snippet [XAML]:

Legend ItemsPanel:

<Charts:ChartLegend.ItemsPanel>

        <ItemsPanelTemplate>

            <VariableSizedWrapGrid Orientation='Horizontal' MaximumRowsOrColumns='5'/>

        </ItemsPanelTemplate>

    </Charts:ChartLegend.ItemsPanel>

</Charts:ChartLegend>

We have prepared the sample based on this and this can be downloaded from the following location. 

Please let us know if you require any further assistance on this.

Regards,

Karthikeyan V.


Attachment: ChartLegendWithWrapPanel_c9b8abdf.zip

Pseudocode
Replied On March 20, 2014 08:51 AM UTC

Thanks for the fast response.
But this is not the solution for my problem.
I have only a small size for the Legend and ItemsPanel should be scrollable if the Panel not fit.
Your example with the VariableSizedWrapGrid grow endless.


Thanks


Karthikeyan V [Syncfusion]
Replied On March 21, 2014 04:17 AM UTC

Hi Christof,

Thanks for the update.

You can achieve your requirement with help the ScrollViewer can be enabled for ChartLegend by overriding its ControlTemplate as in below code snippets.

Code snippet [XAML]:

<Charts:ChartLegend.Template>

                        <ControlTemplate>

                            <ScrollViewer HorizontalScrollBarVisibility="Visible" >

                                <ItemsPresenter/>

                            </ScrollViewer>

                        </ControlTemplate>

</Charts:ChartLegend.Template>

We have prepared a sample based on this. please download the sample under the following location.

Please let us know if you require further assistance on this.

Thanks,

Karthikeyan V.


Attachment: ChartLegendWithScrollViewer_2a2d44a.zip

Pseudocode
Replied On March 21, 2014 09:33 AM UTC

Thanks for help! :-)


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

;