This is a migrated thread and some comments may be shown as answers.
Infinite or NaN values in finalRect
3 Answers 47 Views
This is a migrated thread and some comments may be shown as answers.
Alexey Oyun
Top achievements
Rank 1
Alexey Oyun asked on 12 Jul 2010, 08:30 AM
Version: 2010.2.609.1040

  Hi,
  I have strange error at categorized line chart with one point. I will try to narrow down and find the cause of it later this day. But I think it will be interesting for you to see error details.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Fri, 9 Jul 2010 13:26:32 UTC


Message: Unhandled Error in Silverlight Application
Code: 4004    
Category: ManagedRuntimeError       
Message: System.InvalidOperationException: UIElement.Arrange(finalRect) cannot be called with Infinite or NaN values in finalRect.
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at Telerik.Windows.Controls.Charting.AxisPanelBase.ArrangeOverride(Size finalSize)
   at System.Windows.FrameworkElement.ArrangeOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

Update:

My bad, this bug should be in Beta forum. I could reproduce this bug on Q2 assemblies. And got everything working on Q1.
So this is bug of Q2.
Here is code to reproduce my bug. When line chart has on point it throws exception. When I add second point with new category. Works just fine.

P.S.: Please move this post to Beta forum.

Thanks, Alexey

ObservableCollection<DataSeries> dataSeries = new ObservableCollection<DataSeries>();
DataSeries series = new DataSeries();
series.Definition = new LineSeriesDefinition();
series.LegendLabel = "Legend Label";
DataPoint dataPoint = new DataPoint
                        {
                            YValue = 10,
                            XCategory = "Category 01"
                        };
series.Add(dataPoint);
//dataPoint = new DataPoint
//              {
//                YValue = 20,
//                XCategory = "Category 02"
//              };
series.Add(dataPoint);
dataSeries.Add(series);
SeriesMappingCollection seriesMappings = new SeriesMappingCollection();
for (int serieIndex = 0; serieIndex < dataSeries.Count; serieIndex++)
{
    DataSeries chartSeries = dataSeries[serieIndex];
    SeriesMapping seriesMapping = new SeriesMapping();
    seriesMapping.CollectionIndex = serieIndex;
    seriesMapping.LegendLabel = chartSeries.LegendLabel;
    seriesMapping.SeriesDefinition = chartSeries.Definition;
    seriesMapping.ItemMappings.Add(new ItemMapping(DataPointMember.YValue.ToString(), DataPointMember.YValue));
    seriesMapping.ItemMappings.Add(new ItemMapping(DataPointMember.XCategory.ToString(), DataPointMember.XCategory));
    seriesMappings.Add(seriesMapping);
}
testChart.SeriesMappings = seriesMappings;
testChart.ItemsSource = dataSeries;

3 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 14 Jul 2010, 09:08 AM
Hi Alexey Oyun,

We are aware there is a problem when having a single point Line series in our Q2.Beta release. Our developers have already resolved this issue and you can expect the fix available in our official Q2 2010 release, expected later this week.

Please, accept our apologies for the inconvenience caused.

Sincerely yours,
Nikolay
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
0
Dheeraj Ramaswamy
Top achievements
Rank 2
answered on 05 Aug 2010, 09:55 PM
Is this issue resolved? I just downloaded the latest internal build of 7.30 but issue was still present
0
Alexey Oyun
Top achievements
Rank 1
answered on 06 Aug 2010, 08:31 AM
  Hi Ramaswamy,

  At least it was fixed in official release 2010 Q2 build 2010.2.714.1040
Tags
Chart
Asked by
Alexey Oyun
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Dheeraj Ramaswamy
Top achievements
Rank 2
Alexey Oyun
Top achievements
Rank 1
Share this question
or