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

Custom Chart Layout, using SeriesMappings

1 Answer 59 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Tony Ser
Top achievements
Rank 1
Tony Ser asked on 25 Aug 2010, 11:54 PM
Hello,

Up until now I have been using the DefaultView.ChartArea, with multiple Series being populated via setting the Chart's SeriesMappings collection.

I am now looking to move to a more complex Chart layout so that I have full control over the legend (from this blog post).  

My frist step towards doing this is to change from the default layout to a custom layout (no legend yet). My XAML looks like this:
<control:RadChart x:Name="_RadChart" UseDefaultLayout="False">
  <Grid>
      <!-- Chart Grid Layout Definitions -->
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="50"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="50"/>
      </Grid.RowDefinitions>
             
      <!--ChartArea-->
      <chart:ChartArea x:Name="_ChartArea"
             EnableAnimations="false"
             LegendName="CustomLegend"
             Grid.Column="1" />
 
  </Grid>
</control:RadChart>

In my code behind I have changed over all my _RadChart.DefaultView.ChartArea references to _ChartArea, but now my series do not appear to load at all, and I am faced with the "NoDataString" text.


I searched online, and I found how to setup a custom layout but it uses the DataSeries method.  Can you please give me an example which does custom layouts with SeriesMappings?

Thank you!

1 Answer, 1 is accepted

Sort by
0
Tony Ser
Top achievements
Rank 1
answered on 26 Aug 2010, 01:03 AM
Nvm, I found an example.

For those interested I needed to set the SeriesMapping.ChartAreaName to my custom ChartArea and it worked!

Tags
Chart
Asked by
Tony Ser
Top achievements
Rank 1
Answers by
Tony Ser
Top achievements
Rank 1
Share this question
or