Hi, i need your help!!!!
Currently i´m developing a user control, which consists of a XamChart, where I get the value of Crosshairs.GraphY, but always returns 0.0, when the XamWebChart on Silverlight if you return the value to be, exists a problem with this property?
This is to do a Drag & Drop column, i'm repeat on Silverlight works right, but on WPF not
Sample of my code:
XAML
<igCA:XamChart HorizontalAlignment="Stretch" Name="xamWebChart1" VerticalAlignment="Stretch" Width="Auto" MouseMove="xamWebChart1_MouseMove" MouseDown="XamChart1_MouseDown" MouseUp="xamChart1_MouseUp" />
------------
xaml.cs
private
private void xamChart1_MouseUp(object sender, MouseButtonEventArgs e)
{
ShapeToNull();
if (_tmpStock == null)
return;
}
private void ShapeToNull()
if (_shape != null)
_shape =
null;
TextBlockColumnValue.Opacity = 0;
Cursor =
Thanks and if you need more info about the case, let me know.
Regards.
private void XamChart1_MouseDown(object sender, MouseButtonEventArgs e)
this.xamWebChart1.HitTest(e);
Cursors.SizeNS;
var webChart = (XamChart)sender;
var index = 0;
foreach (var serie in webChart.Series)
DataPoint dp = _shape.SelectedObject as DataPoint;
if (dp != null)
/*string _nameof = dp.Name;
double _valueof = dp.Value;*/
index = serie.DataPoints.IndexOf(dp);
(index > -1)
_tmpStock = _stockViewModelFiltered.SumarizedStocks[index];
.RemoveEmptyEntries);
_tmpColumnName = names[3];
;
void xamWebChart1_MouseMove(object sender, MouseEventArgs e)
var xamWebChart = (XamChart)sender;
var graphY = xamWebChart.Crosshairs.GraphY; <-- Here return 0.0
dp.Value = graphY;
TextBlockColumnValue.Text = ((
)graphY).ToString();
TextBlockColumnValueTranslateTransform.X = e.GetPosition(
).X - 40;
TextBlockColumnValueTranslateTransform.Y = e.GetPosition(
).Y;
TextBlockColumnValue.Opacity = _opacity;
else
HitTestArgs _shape;
Hi,
Have you tried enabling the Crosshairs:
<igCA:XamChart>
<igCA:XamChart.Crosshairs>
<igCA:Crosshairs Enabled="True" />
</igCA:XamChart.Crosshairs>