We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Question about Polar/radar view

Hello,

In our project, we have to draw a polar view with some particularities :
1°) Our radar view has the 25% first not used (without anything in it) : Is it possible to set a scale like 150-200 ? could we choose the part of the grid we would like to draw ?
2°) our radar has'nt the first value at the vertical but it's at 10°. (If it was a clock, our first value need to be at 1 o'clock not 12) : Can we rotate our view ?
3°) Could we fill the range of our value (like we can do in the c# version) : how could we do that ? Will it be possible to clear some part of it ? (we still have to let the center free of drawing)

Thank in advance.

5 Replies

MP Murugavel P Syncfusion Team April 12, 2010 08:52 AM UTC

Hi Pallini Anthony,

Thanks for choosing Syncfusion Products.

1) You can draw the part of grid by set the custom scale for Secondary axis of chart area. The following line of XAML code is used to set the scale between 150 and 200.

XAML:







2) Radar/Polar chart doesn't support to rotate the first value at the vertical by given angle.

3) You can customize the range of value using the Range property of ChartAxis. The following line code describes how to set the Range through C# code.

C#:

chart.Areas[0].SecondaryAxis.Range = new DoubleRange(150, 250);

Here with I have attached the simple sample to demonstrate your first and third requirement.

Let us know if you have any questions.


Thanks,
Murugavel




RadarChart_198acd71.zip


AP Anthony PALLINI April 13, 2010 10:57 AM UTC

Thank you, it work great.

It's too bad that we could'nt rotate it but we will find another way to do what we want.

We have another question :

Is it possible to add some image in our polar view ? (we want to add a picture in the background with autosizing) The picture need to be added in the c# code because the image need to dynamicaly loaded.


Thank in advance.


MP Murugavel P Syncfusion Team April 14, 2010 01:38 PM UTC

Hi Pallini Anthony,

You can add the image as chart area background for polar view using the following lines of C# code.

C#:

ImageBrush brush = new ImageBrush();
ImageSourceConverter converter = new ImageSourceConverter();

//Store the background image into Image brush
brush.ImageSource = converter.ConvertFromString("Background.png") as ImageSource;

//Assign the ImageBrush as a background for chart area.
chart.Areas[0].Background = brush;


In Silverlight, ImageBrush is automatically resizing its image based on the render size.

Here with I have attached the sample based on your requirement. In this sample, When you click Add Image button then image is dynamically add to background of chart area.

Thanks for your interest in Syncfusion Products.

Let us know if you have any questions.

Thanks,
Murugavel





RadarChart_5cb642b6.zip


AP Anthony PALLINI April 16, 2010 02:57 PM UTC

Hello,

Thank you for your fast answer.

We still have one more question, When we add our picture in the background of the chart, we need to keep the Height/width ratio for our chart in order to keep the picture well displayed (it's not just a background)when we resize the web browser, it needs to be resized as well but with a fixed ratio.

Thank in advance.


Have a nice day.


MP Murugavel P Syncfusion Team April 19, 2010 05:34 AM UTC

Hi Pallini Anthony,

You can keep the height and width ratio of chart using the size changed event of the container panel, which has chart control as a children.

In Silverlight, if we don’t initialize the Width and height of the Grid container panel then Grid automatically set its size as web browser total size. In the below code, I have set width and height of the chart control as 75% of web browser width and height in size changed event of Grid.

C#:

Size newSize = e.NewSize;
if (!double.IsNaN(newSize.Height) && !double.IsNaN(newSize.Width))
{
//Set the Chart width as 75% of total browser width.
chart.Width = newSize.Width * 0.75;

//Set the Chart height as 75% of total browser height.
chart.Height = newSize.Height * 0.75;
}

Here with I have attached the simple sample based on your requirement.

Thanks for your interest in Syncfusion Products.

Let us know if you have any questions.

Thanks,
Murugavel




RadarChartReSize_9cbf4b93.zip

Loader.
Live Chat Icon For mobile
Up arrow icon