Polar chart question

Jun 27, 2014 at 10:35 AM

I'm struggling with following problem.
Hope you can help me out. :) !
I try to achive something similar to


On my case I need one series per line, and have the first point of every series be the center of the chart.

Is this possible?
Jun 27, 2014 at 11:09 AM
If using series is a requirement I think you need to create a custom series drawing the arrows. Otherwise I guess the ArrowAnnotation can be used.
If you want to use one series per line, you must specify the colour of each series. Otherwise, the default colour will be different for each series.
The position of the magnitude axis labels is not yet customizable. This is covered by https://oxyplot.codeplex.com/workitem/10223
See the latest code checkin for an example that is close to your case!
Marked as answer by SamTauris on 6/27/2014 at 5:05 AM
Jun 27, 2014 at 12:05 PM

Thanks for the FAST response ! It works!!
May 12, 2016 at 2:01 PM

I'm trying to achieve the same thing without the arrows but my main problem is that the series don't start in the center of the chart. Can you help me?
May 12, 2016 at 2:05 PM

Do you have sample code?
May 12, 2016 at 3:08 PM
Thank you for your prompt response.

Yes I have. I'm using C# and WPF. I'm only testing right now but this is my code:
<oxy:Plot Title="Cohesión Intragrupo" Name="chartcintra" PlotType="Polar" PlotMargins="20,20,4,40" PlotAreaBorderThickness="0" Margin="0,10,4,74">
                                            <oxy:AngleAxis Minimum="0" Maximum="{Binding MaxAngle}" MajorStep="{Binding MajorStep}" MinorStep="{Binding MinorStep}" 
                                            FormatAsFractions = "False" />
                                            <oxy:LineSeries ItemsSource="{Binding SpiralPoints}"/>
                                            <oxy:LineSeries ItemsSource="{Binding SpiralPoints1}"/>
                                            <oxy:LineSeries ItemsSource="{Binding SpiralPoints2}"/>
                                            <oxy:LineSeries ItemsSource="{Binding SpiralPoints3}"/>                                            
            this.DataContext = this;
            this.MaxAngle = 360;
            this.MajorStep = 45;
            this.MinorStep = 11.25;
             this.SpiralPoints = new List<DataPoint> { new DataPoint(0, 0), new DataPoint(3.5, 3.5)};
                this.SpiralPoints1 = new List<DataPoint> { new DataPoint(0, 0), new DataPoint(-3.5, 3.5)};
                this.SpiralPoints2 = new List<DataPoint> { new DataPoint(0, 0), new DataPoint(-3.5, -3.5)};
                this.SpiralPoints3 = new List<DataPoint> { new DataPoint(0, 0), new DataPoint(3.5, -3.5) };
And the result is two lines starting from the point when the SpiralPoint2 ends, this same points starts from the center and the SpiralPoints1 not even there.


Thanks in advance.
May 12, 2016 at 3:09 PM
In the following link you can find the link of the resulting chart: https://www.dropbox.com/s/oqruxmo25nuejfj/PolarChart.png?dl=0
May 12, 2016 at 3:14 PM

Can you draw in Paint for example the result you want?
May 12, 2016 at 3:21 PM
I want the same result of this initial thread but without the arrows:


My main problem is that each line don't start from the center.

In my understanding, if I use this type of chart, I can be able of use cartesian coordinates to draw lines in the plot.

May 12, 2016 at 3:26 PM
May 12, 2016 at 3:31 PM

First you need to make your own class. Derive it from XYAxisSeries.

You also need this:
        public override void Render(IRenderContext rc, PlotModel model)
            // transform to screen coordinates
            var p0 = this.Transform(this.StartPoint);
            var p1 = this.Transform(this.EndPoint);

            // draw the line segments
            rc.DrawLineSegments(new[] { p0, p1 }, this.ActualColor, this.StrokeThickness);
Then you make the plotItems:
                CustomPlotItem plotItem = new CustomPlotItem();
                plotItem.EndPoint = new DataPoint(x, y);
Then add it to the series of your model:
That should do the trick :-)
May 12, 2016 at 4:23 PM
Thank you Sam.

I already tried but is not adding the line into the plot. What do you think is happening?
May 17, 2016 at 10:38 AM

Can you supply me your code?