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

Value cannot be null. Parameter name: format when using SeriesDescriptor and Legend

1 Answer 92 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
StepTNT
Top achievements
Rank 1
StepTNT asked on 11 Jun 2015, 03:06 PM

Quick code snippet:

 

1.public class Data
2.    {
3.        public int XValue{ get; set; }
4. 
5.        public double YValue { get; set; }
6. 
7.        public string Network { get; set; }
8.    }
 

 

01.<telerikPrimitives:RadLegendControl LegendProvider="{Binding ElementName=chart}"                                           
02.                                            x:Name="legend"
03.                                            Grid.Row="0"                                             
04.                                            >
05.            <telerikPrimitives:RadLegendControl.ItemsPanel>
06.                <ItemsPanelTemplate>
07.                    <StackPanel Orientation="Horizontal"/>
08.                </ItemsPanelTemplate>
09.            </telerikPrimitives:RadLegendControl.ItemsPanel>
10.        </telerikPrimitives:RadLegendControl>
11.        <telerikChart:RadCartesianChart x:Name="chart"
12.                                        PaletteName="DefaultLight"
13.                                        Grid.Row="1">
14.            <telerikChart:RadCartesianChart.VerticalAxis>
15.                <telerikChart:LinearAxis Maximum="100"
16.                                         Minimum="0"
17.                                         />
18.            </telerikChart:RadCartesianChart.VerticalAxis>
19.            <telerikChart:RadCartesianChart.HorizontalAxis>
20.                <telerikChart:LinearAxis
21.                                         RangeExtendDirection="Both"
22.                                         LastLabelVisibility="Hidden"/>
23.            </telerikChart:RadCartesianChart.HorizontalAxis>
24.             
25.            <telerikChart:RadCartesianChart.SeriesProvider>
26.                <telerikChart:ChartSeriesProvider x:Name="provider">                   
27.                    <telerikChart:ChartSeriesProvider.SeriesDescriptors>
28.                        <telerikChart:ScatterSeriesDescriptor XValuePath="XValue"
29.                                                              YValuePath="YValue"                                                             
30.                                                              LegendTitlePath="Label">                           
31.                            <telerikChart:ScatterSeriesDescriptor.Style>
32.                                <Style TargetType="telerikChart:ScatterSplineAreaSeries">
33.                                    <Setter Property="ShowLabels" Value="True"/>                                   
34.                                    <Setter Property="IsVisibleInLegend" Value="True"/>
35.                                    <Setter Property="Fill" Value="white"/>
36.                                    <Setter Property="CompositeMode" Value="MinBlend"/>                                                                        
37.                                    <Setter Property="StrokeThickness" Value="2"/>
38.                                    <Setter Property="Opacity" Value="0.7"/>
39.                                    <Setter Property="StrokeLineJoin" Value="Round"/>                                    
40.                                </Style>
41.                            </telerikChart:ScatterSeriesDescriptor.Style>                             
42.                        </telerikChart:ScatterSeriesDescriptor>
43.                    </telerikChart:ChartSeriesProvider.SeriesDescriptors>                   
44.                </telerikChart:ChartSeriesProvider>
45.            </telerikChart:RadCartesianChart.SeriesProvider>         
46.        </telerikChart:RadCartesianChart>

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 15 Jun 2015, 08:55 AM
Hi Stafeno,

Thank you for sending this code snippet. Based on it I have built sample project demonstrating how to setup chart and its legend. Please have a look at the attachment and let us know if this helps. If the setup does not represent the scenario specifics, could you modify it and send it back to us.

Regards,
Tsvyatko
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
StepTNT
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or