Opne Lines in Polar View

2 posts, 0 answers
  1. Marcello
    Marcello avatar
    82 posts
    Member since:
    Apr 2013

    Posted 18 Oct 2016 Link to this post


    is possible to draw open line serie in polar chart as wpf version?



    Thanks, marc.

  2. Dimitar
    Dimitar avatar
    2984 posts

    Posted 19 Oct 2016 Link to this post

    Hello Marcello,

    Thank you for writing.

    This can be achieved by using a custom renderer. It will allow you to override the function that creates the graphics path:
    class MyRenderer : PolarRenderer
        public MyRenderer(PolarArea area) : base(area)
        { }
        protected override void Initialize()
            for (int i = 0; i < this.DrawParts.Count; i++)
                PolarLineSeriesDrawPart linePart = this.DrawParts[i] as PolarLineSeriesDrawPart;
                if (linePart != null)
                    this.DrawParts[i] = new CustomLineSeriesDrawPart((PolarLineSeries)linePart.Element, this);
    internal class CustomLineSeriesDrawPart : PolarLineSeriesDrawPart
        public CustomLineSeriesDrawPart(PolarLineSeries series, IChartRenderer renderer) : base(series, renderer)
        { }
        protected override GraphicsPath GetLinePath()
            PointF[] points = GetPointsPositionsArray();
            GraphicsPath path = new GraphicsPath();
            if (points.Length >2)
                return path;
            return base.GetLinePath();

    To change the default renderer use the: 
    void radChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e)
        e.Renderer = new MyRenderer(e.Area as PolarArea);

    I hope this will be useful. Let me know if you have additional questions.

    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top