SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.



Is it possible to set legend item orientation to horizontal? Normally they all stack vertically.


  • You must to post comments

Hi Charith,

Unfortunately, there aren’t any ways to do this except modifying control’s template. As a workaround, you could use VisualTreeHelper to get ItemsControl in code and change Orientation of used Panel, or replace it by another panel. Something like the following should help:

            var itemsControl = legendControl.Template.FindName("PART_LegendItems", legendControl) as ItemsControl;
            if (itemsControl != null)
                var factoryPanel = new FrameworkElementFactory(typeof (StackPanel));
                factoryPanel.SetValue(StackPanel.OrientationProperty, Orientation.Horizontal);

                itemsControl.ItemsPanel = new ItemsPanelTemplate {VisualTree = factoryPanel};

I logged your request and we will try to improve SciChartLegend in future.

Best regards,

  • Andrew
    Just to add my 2p: Funnily enough someone else asked a similar question today on email. I would suggest re-templating as then you can do anything (That's the power of WPF!) There is a forum post on custom templating the Legend Control here. Hope this helps! Andrew
  • You must to post comments

Just an update, we are about to release SciChart v3.1, which will include a few enhancements to the legend. In v3.1, syntax to achieve a horizontal legend will include:

<!-- New to SciChart v3.1! LegendModifier exposes ability to dock a legend inside a chart, change orientation -->
<SciChart:LegendModifier  ShowLegend="True"
          Margin="10" />

<!-- OR -->

<SciChartLegend Orientation="Horizontal"/>

That’s it!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.