RadChart Error

Thread is closed for posting
2 posts, 1 answers
  1. Konrad
    Konrad avatar
    21 posts
    Member since:
    Sep 2008

    Posted 08 Sep 2009 Link to this post


    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:

    1 ChartSeries chartSeries; 
    2 radChart.Series.Clear(); 
    4 radChart.PlotArea.XAxis.Clear(); 
    5 radChart.PlotArea.XAxis.AutoScale = false
    6 radChart.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between; 
    7 radChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270; 
    8 radChart.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.Unit.Percentage(20); 
    9 radChart.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top; 
    11 radChart.PlotArea.YAxis.IsLogarithmic = true
    14 chartSeries = new ChartSeries("test", ChartSeriesType.Spline); 
    15 radChart.Series.Add(chartSeries); 
    17 ChartSeriesItem chartSeriesItem = new ChartSeriesItem(12); 
    18 chartSeries.Items.Add(chartSeriesItem); 
    20 chartSeriesItem = new ChartSeriesItem(43); 
    21 chartSeries.Items.Add(chartSeriesItem); 
    23 chartSeriesItem = new ChartSeriesItem(65); 
    24 chartSeries.Items.Add(chartSeriesItem); 

    Anyone have any ideas?

  2. Answer
    Giuseppe avatar
    2363 posts

    Posted 11 Sep 2009 Link to this post

    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top