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

RadChart Error

1 Answer 53 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Konrad
Top achievements
Rank 1
Konrad asked on 08 Sep 2009, 06:03 PM
Hi,

I have a strange situation where working splines or lines in RadChart gives me the following error on Mono:
(It works fine on IIS7)

Invalid parameter passed. Number of points and types must be same.

Description: HTTP 500. Error processing request.

Stack Trace:

System.ArgumentException: Invalid parameter passed. Number of points and types must be same.  at System.Drawing.Drawing2D.GraphicsPath..ctor (System.Drawing.PointF[] pts, System.Byte[] types, FillMode fillMode) [0x00000]   at System.Drawing.Drawing2D.GraphicsPath..ctor (System.Drawing.PointF[] pts, System.Byte[] types) [0x00000]   at (wrapper remoting-invoke-with-check) System.Drawing.Drawing2D.GraphicsPath:.ctor (System.Drawing.PointF[],byte[])  at Telerik.Charting.RenderEngine.DrawLines (Telerik.Charting.ChartSeries series, Int32 index, System.Drawing.PointF[] points) [0x00000]   at Telerik.Charting.RenderEngine.RenderLineSeries (Telerik.Charting.ChartSeries series, Int32 index) [0x00000]   at Telerik.Charting.RenderEngine.Render (Telerik.Charting.ChartSeries series, Int32 index) [0x00000]   at Telerik.Charting.RenderEngine.RenderPlotAreaElements (Boolean withGrid, Boolean withTicks) [0x00000]   at Telerik.Charting.RenderEngine.Render (IContainer element) [0x00000]   at Telerik.Charting.RenderEngine.Render (Boolean shouldClone) [0x00000]   at Telerik.Charting.Chart.GetImage (Int32 width, Int32 height) [0x00000] 

Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433


My code is as follows:

ChartSeries chartSeries; 
radChart.Series.Clear(); 
 
radChart.PlotArea.XAxis.Clear(); 
radChart.PlotArea.XAxis.AutoScale = false
radChart.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between; 
radChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270; 
radChart.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.Unit.Percentage(20); 
radChart.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top; 
 
radChart.PlotArea.YAxis.IsLogarithmic = true
 
 
chartSeries = new ChartSeries("test", ChartSeriesType.Spline); 
radChart.Series.Add(chartSeries); 
 
ChartSeriesItem chartSeriesItem = new ChartSeriesItem(12); 
chartSeries.Items.Add(chartSeriesItem); 
 
chartSeriesItem = new ChartSeriesItem(43); 
chartSeries.Items.Add(chartSeriesItem); 
 
chartSeriesItem = new ChartSeriesItem(65); 
chartSeries.Items.Add(chartSeriesItem); 


Anyone have any ideas?

Thanks,
Konrad

1 Answer, 1 is accepted

Sort by
0
Accepted
Giuseppe
Telerik team
answered on 11 Sep 2009, 02:34 PM
Hello Konrad,

It seems the Mono platform has a problem with the implementation of some specific graphics scenarios (the exception is triggered by their GraphicsPath implementation).

Unfortunately as the scenario works correctly with the regular .Net platform, there is not much we can do right now but forward your feedback to the Mono developers and hope that they will be able to resolve the problem so Mono behaves correctly under the same circumstances as well.


Regards,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Chart (Obsolete)
Asked by
Konrad
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or