This is a migrated thread and some comments may be shown as answers.

Get XValue in Categorial Chart

10 Answers 106 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Ramya
Top achievements
Rank 1
Ramya asked on 09 Nov 2011, 04:21 PM
Hi,
I am using markedZone to show annotations. I have to add an image as annotation so i have used ImageBrush to fill the marked Zone. It works fine when my chart has both XValues and YValues. My problem is that when i have a categorial chart I am not able to mark the zone. I am using  ((Telerik.Windows.Controls.ChartingChartArea)(sender)).AxisX.ConvertPhysicalUnitsToData(e.MouseData.GetPosition(this).X) to get the datapoints. But this is not always giving me the points with correct precision.
How can i get the correct point.

10 Answers, 1 is accepted

Sort by
0
Ramya
Top achievements
Rank 1
answered on 11 Nov 2011, 06:15 AM
Is there any workaround???
0
Accepted
Sia
Telerik team
answered on 14 Nov 2011, 01:48 PM
Hello Ramya,

The categories are indexed, which means that you can use 0,1,2, etc. for XValue to position your marked zones.

Greetings,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ramya
Top achievements
Rank 1
answered on 14 Nov 2011, 02:07 PM
Hello Sia,
Thanks a lot for the reply. Can you please let me know how to add marked zones using indexes?

Regards,
Ramya
0
Ramya
Top achievements
Rank 1
answered on 14 Nov 2011, 02:14 PM
Hello Sia,
Thanks a lot for the reply. Can you please let me know how to add marked zones using indexes?

Regards,
Ramya
0
Ramya
Top achievements
Rank 1
answered on 15 Nov 2011, 01:29 PM
Hello Sia,
Sorry that was a stupid question...:)
I wanted to ask you one more question.
Currently I am using this to add the markedZone. However I am not able to see a marked zone in Pie Chart. Is there a way to add a marked zone in Pie?
MarkedZone tempZone = new MarkedZone();
               tempZone.StartY = e.DataPoint.YValue;
               tempZone.EndY = e.DataPoint.YValue+((Axis)(((((ChartArea)(sender)))).AxisY)).ActualStep;
               tempZone.StartX =  e.DataPoint.XValue;
               tempZone.EndX = e.DataPoint.XValue++((Axis)(((((ChartArea)(sender)))).AxisY)).ActualStep;
0
Sia
Telerik team
answered on 15 Nov 2011, 01:53 PM
Hi Ramya,

I am happy to hear that you managed to find a solution by yourself.

Unfortunately the marked zones are available only when having axes. In the pie chart they are missing so the marked zones cannot be drawn there.

If you have more questions, do not hesitate to contact us again.

Kind regards,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ramya
Top achievements
Rank 1
answered on 17 Nov 2011, 08:26 AM
ohh...Thats a bad news.. :( Will there be any workaorund to add an annotation in pie and doughnut charts?
0
Sia
Telerik team
answered on 17 Nov 2011, 01:30 PM
Hello Ramya,

Can you please send us a design of what you need? What do you need to show/measure with such marked zone when having a pie?

Best wishes,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ramya
Top achievements
Rank 1
answered on 18 Nov 2011, 09:47 AM
Hi Sia,
I calculated the position using the sweep angle and start angle and added the image at that position. :) I wanted something like the attached file.
Thanks for your time and attention.

Regards,
Ramya
0
Evgenia
Telerik team
answered on 22 Nov 2011, 04:06 PM
Hi Ramya,

Your question was answered in this thread started by you. I suggest that you choose one of the threads and keep our further communication on this there. This will help us avoid duplicate topics and will make it easier for both sides to follow it.

Greetings,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Ramya
Top achievements
Rank 1
Answers by
Ramya
Top achievements
Rank 1
Sia
Telerik team
Evgenia
Telerik team
Share this question
or