Manishkumar
Top achievements
Rank 1
Manishkumar
asked on 19 Jan 2011, 02:33 PM
Hi,
Is it possible to get the X and Y values of the point, where user right clicked on the Stacked Area to open the context Menu?
Or any nearby DataPoint X,Y Values.
Please Reply as soon as possible.
Thanks in Advance.
Is it possible to get the X and Y values of the point, where user right clicked on the Stacked Area to open the context Menu?
Or any nearby DataPoint X,Y Values.
Please Reply as soon as possible.
Thanks in Advance.
3 Answers, 1 is accepted
0
Hi Manishkumar,
To be able to get the XValue and YValue of the right-clicked point you can use the following approach:
GetPosition method of the System.Windows.Point struct will give you the Physical X and Y coordinates of the mose pointer poition. You can easily get the Data standing behind these values by using our Axis.ConvertPhysicalUnitsToData method:
Regards,
Evgenia
the Telerik team
To be able to get the XValue and YValue of the right-clicked point you can use the following approach:
GetPosition method of the System.Windows.Point struct will give you the Physical X and Y coordinates of the mose pointer poition. You can easily get the Data standing behind these values by using our Axis.ConvertPhysicalUnitsToData method:
void ChartArea_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
Point myPoint = e.GetPosition((UIElement)sender);
double x = RadChart1.DefaultView.ChartArea.AxisX.ConvertPhysicalUnitsToData(myPoint.X) + RadChart1.DefaultView.ChartArea.AxisX.MinValue;
double y = RadChart1.DefaultView.ChartArea.AxisY.ConvertPhysicalUnitsToData(myPoint.Y) + RadChart1.DefaultView.ChartArea.AxisY.MinValue;
}
Regards,
Evgenia
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Sivakumar
Top achievements
Rank 1
answered on 13 Aug 2012, 11:44 AM
How can assign x axis values to Spline Area chart, when i assign Low and High values, x axis always starts with 1,2,3.....
but i don't want that to be happen, i have my own x-axis values , is it possible?
Could you please help me................
but i don't want that to be happen, i have my own x-axis values , is it possible?
Could you please help me................
0
Hi Manishkumar,
Petar Kirov
the Telerik team
I believe that you haven't bound the XValue of the series. Binding it should solve your issue. For example:
<
telerik:RadChart
x:Name
=
"RadChart1"
ItemsSource
=
"{Binding Data}"
>
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SplineRangeSeriesDefinition
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:ItemMapping
FieldName
=
"Low"
DataPointMember
=
"Low"
/>
<
telerik:ItemMapping
FieldName
=
"High"
DataPointMember
=
"High"
/>
<
telerik:ItemMapping
FieldName
=
"Cat"
DataPointMember
=
"XCategory"
/>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
</
telerik:RadChart
>
For more information on Series Mappings, you may refer to our documentation.
I hope this helps.
Petar Kirov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.