Articles in this section
Category / Section

How to add multiple legend items in scroll viewer of WPF Chart (SfChart)?

1 min read


The legend items are used to display the series label values. When a greater number of series are added to the chart, some of the legend items are hidden from the view. WPF Chart (SfChart) allows you to place the chart legend inside the scrollbar to view all the legend items. This article describes how to add multiple legend items inside the scrollbar.


If you want to add multiple legend items inside any container such as scroll viewer, you need to define the control template for the legends in WPF Chart (SfChart).


<!—Adding ScrollViewer for Legend items-->
<chart:SfChart x:Name="sfchart" Margin="10" >
        <chart:ChartLegend  DockPosition="Top">
                    <ScrollViewer Margin="30" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">


WPF Chart displays Multiple Items in ScrollViewer


Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment