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.
Unfortunately, activation email could not send to your email. Please try again.

Question about Polar/radar view

Thread ID:

Created:

Updated:

Platform:

Replies:

93890 Apr 9,2010 09:42 AM Apr 19,2010 01:34 AM Silverlight 5
loading
Tags: Chart
Anthony PALLINI
Asked On April 9, 2010 09:42 AM

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.

Murugavel P [Syncfusion]
Replied On April 12, 2010 04:52 AM

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

Anthony PALLINI
Replied On April 13, 2010 06:57 AM

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.

Murugavel P [Syncfusion]
Replied On April 14, 2010 09:38 AM

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

Anthony PALLINI
Replied On April 16, 2010 10:57 AM

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.

Murugavel P [Syncfusion]
Replied On April 19, 2010 01:34 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;