This is a migrated thread and some comments may be shown as answers.

No Data Series error when using custom layout for RadChart

1 Answer 88 Views
Chart
This is a migrated thread and some comments may be shown as answers.
D Warren
Top achievements
Rank 1
D Warren asked on 27 Apr 2011, 12:24 AM
I'm trying to have the Legend lay on top of the chart area. To my understanding the following code should work. I am setting my data in codebehind. If I change the value of UseDefaultLayout to True the chart control displays the correct chart by using the default ChartArea and default ChartLegend etc. However, when I set UseDefaultLayout to False, like in the code below, the ChartArea displays the error No Series Data. The ChartLegend is located at the desired location so I need to know why my data is not being displayed. Please help me understand why this is not working and how to fix it.

<DataTemplate x:Key="ChartDataTemplate"
    <telerik:RadChart x:Name="Chart" UseDefaultLayout="False"
        <Grid
            <Grid.RowDefinitions
                <RowDefinition Height="1*" /> 
                <RowDefinition Height="19*" /> 
            </Grid.RowDefinitions
            <Grid.ColumnDefinitions
                <ColumnDefinition Width="19*" /> 
                <ColumnDefinition Width="1*" /> 
            </Grid.ColumnDefinitions
            <telerik:ChartLegend x:Name="LegendArea"
                                 Grid.Row="1"
                                 Grid.Column="0"
                                 HorizontalAlignment="Right"
                                 VerticalAlignment="Top" /> 
            <telerik:ChartArea LegendName="LegendArea" /> 
        </Grid
    </telerik:RadChart
</DataTemplate>
Thank you,
Danny

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 28 Apr 2011, 09:06 AM
Hi D Warren,

Take a look at this blogpost that demonstrated how to position the ChartLegend inside the ChartArea.
Also if you are using SeriesMappings to populate the Chart with data  make sure you set the corresponding ChartArea's Name to the SeriesMapping.ChartAreaName property.

Best wishes,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
D Warren
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or