I need to make a polar chart that is not labeled 0 to360 but 0 to 180 and 0 to -150. Any ideas on how I might do this?
I included an image of what I need in case it is not clear.
2 Answers, 1 is accepted
0
Martin Ivanov
Telerik team
answered on 08 Feb 2016, 02:25 PM
Hi Mark,
The polar chart doesn't support such behavior. In order to achieve the desired result you can use the following approach:
Use GenericDataPointBinding<T> for the AngleBinding of the series. In its ValueSelector you can convert the negative values to positive ones in the range between 181 and 359 degrees. For example, -60 should become 300 and -150 should be 210.
Use a LabelTemplate and an IValueConverter to display the labels with the negative values. Basically, if the value in the label is bigger then 180, make the calculations and return a negative value. An example:
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
var angle = (double)value;
return angle > 180 ? -(360 - angle) : angle;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
I hope this information is useful.
Regards,
Martin
Telerik
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 Feedback Portal
and vote to affect the priority of the items
I need to make a half-polar chart. Any ideas on how I might do this?
Please find the attached document for your reference.
Thanks
Rajalakshmi.s
Martin Ivanov
Telerik team
commented on 21 Jun 2022, 01:15 PM
There is no Telerik control that allows this type of visualization. One way that you can achieve something similar is to use RadCartesianChart for the data and a custom chart annotation for the radar lines. However, note that with this approach you will need to draw and position the lines manually.