SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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.


how can i apply styling for legend in legend modifier? i want to apply the following style

<Style x:Key="LegendStyle" TargetType="s:LegendModifier">
        <Setter Property="ContentTemplate">
            <s:SciChartLegend  x:Name="legendControl"  Margin="2,2" Orientation="Horizontal"  Background="Transparent" BorderThickness="0" ScrollViewer.VerticalScrollBarVisibility="Auto"
                                Visibility="{Binding IsLegendVisible,Converter={StaticResource  BoolToVisibilityConverter}}" 
                                LegendData="{Binding LegendData,  ElementName=legendModifier,Mode=OneWay}">

                    <SciChart:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
                    <DataTemplate DataType="SciChart:XyzSeriesInfo">
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            <Rectangle Grid.Column="0"

                                                Stroke="{Binding SeriesColor,
                                                Converter={StaticResource ColorToBrushConverter}}" />
                            <TextBlock Grid.Column="1" Foreground="Black" 
                                                Text="{Binding SeriesName}" FontWeight="Normal"/>
  • You must to post comments

Hi Raghupathy,

Have you seen our Legend API Overview article? It shows you the legend API, including templating the legend items.

We also have an advanced tutorial on legend item templating to introduce custom fields into the legend. Perhaps this helps?

enter image description here

If not, please explain clearly what you need and we will do our best to help.

Best regards,

  • Raghupathy
    I want to display the legends outside of the chart surface i can't able to use ""
  • Raghupathy
    I want to show the legends outside of the chart surface i can do that for GetLegendDataFor="AllSeries" but i can't do that for GetLegendDataFor="AllVisibleSeries" i got a error message saying that 'Set property 'Abt.Controls.SciChart.ChartModifiers.LegendModifier.GetLegendDataFor' threw an exception.' Line number '67' and line position '39'. I create the chart when my application launch after when the user select the y axis value then only polt the graph.I think this is the problem.also how can i change the legend color it always white??
  • Andrew
    Hi Raghupathy, I believe there was a bug reported with GetLegendDataFor ... see It was fixed in build 5199. Can you double-check the latest nightly build and let us know if it resolves the problem? If not, please let me know. One of the team will investigate. For your other question - legend color white, why not create a new question, we will answer it asap. Best regards, Andrew
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.