Hello,
I searched for sample projects but I can not adapt them to my graph. When I adapted them, just nothing happened. Here my xaml and code behind;
<ig:XamDataChart Name="xamDataChart1" HorizontalZoomable="True" HorizontalZoombarVisibility="Visible" VerticalZoomable="False" Margin="0,0,0,0" Legend="{Binding ElementName=xmLegend}"> <ig:SyncManager.SyncSettings> <ig:SyncSettings SyncChannel="Group1" SynchronizeHorizontally="True" SynchronizeVertically="False" /> </ig:SyncManager.SyncSettings> <ig:XamDataChart.Axes> <ig:CategoryDateTimeXAxis x:Name="xAxis" DateTimeMemberPath="TARIH" Interval="1"> <ig:CategoryDateTimeXAxis.LabelSettings> <ig:AxisLabelSettings Location="OutsideBottom" Extent="40" Angle="270" /> </ig:CategoryDateTimeXAxis.LabelSettings> <ig:CategoryDateTimeXAxis.Label> <DataTemplate> <TextBlock Text="{Binding Item.Date, StringFormat={}{0:d.MM} }" Margin="-25,0,0,0" FontSize="10" /> </DataTemplate> </ig:CategoryDateTimeXAxis.Label> <ig:CategoryDateTimeXAxis.Style> <Style TargetType="ig:Axis"> <Setter Property="MajorStrokeThickness" Value="0"/> </Style> </ig:CategoryDateTimeXAxis.Style> </ig:CategoryDateTimeXAxis> <ig:NumericYAxis x:Name="yAxis" Label="{}{0:P}"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Location="InsideLeft" /> </ig:NumericYAxis.LabelSettings> <ig:NumericYAxis.Style> <Style TargetType="ig:Axis"> <Setter Property="MajorStrokeThickness" Value="0"/> </Style> </ig:NumericYAxis.Style> </ig:NumericYAxis> <ig:NumericYAxis x:Name="yAxisVol"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Location="InsideRight" /> </ig:NumericYAxis.LabelSettings> <ig:NumericYAxis.Style> <Style TargetType="ig:Axis"> <Setter Property="MajorStrokeThickness" Value="0"/> </Style> </ig:NumericYAxis.Style> </ig:NumericYAxis> </ig:XamDataChart.Axes> </ig:XamDataChart>
HorizontalZoomable="True"
HorizontalZoombarVisibility="Visible"
VerticalZoomable="False"
Margin="0,0,0,0"
Legend="{Binding ElementName=xmLegend}">
<ig:SyncManager.SyncSettings>
<ig:SyncSettings SyncChannel="Group1"
SynchronizeHorizontally="True"
SynchronizeVertically="False" />
</ig:SyncManager.SyncSettings>
<ig:XamDataChart.Axes>
<ig:CategoryDateTimeXAxis x:Name="xAxis" DateTimeMemberPath="TARIH" Interval="1">
<ig:CategoryDateTimeXAxis.LabelSettings>
<ig:AxisLabelSettings Location="OutsideBottom" Extent="40" Angle="270" />
</ig:CategoryDateTimeXAxis.LabelSettings>
<ig:CategoryDateTimeXAxis.Label>
<DataTemplate>
<TextBlock Text="{Binding Item.Date, StringFormat={}{0:d.MM} }" Margin="-25,0,0,0" FontSize="10" />
</DataTemplate>
</ig:CategoryDateTimeXAxis.Label>
<ig:CategoryDateTimeXAxis.Style>
<Style TargetType="ig:Axis">
<Setter Property="MajorStrokeThickness" Value="0"/>
</Style>
</ig:CategoryDateTimeXAxis.Style>
</ig:CategoryDateTimeXAxis>
<ig:NumericYAxis x:Name="yAxis" Label="{}{0:P}">
<ig:NumericYAxis.LabelSettings>
<ig:AxisLabelSettings Location="InsideLeft" />
</ig:NumericYAxis.LabelSettings>
<ig:NumericYAxis.Style>
</ig:NumericYAxis.Style>
</ig:NumericYAxis>
<ig:NumericYAxis x:Name="yAxisVol">
<ig:AxisLabelSettings Location="InsideRight" />
</ig:XamDataChart.Axes>
</ig:XamDataChart>
LineSeries lineSeri = new LineSeries(); lineSeri.ItemsSource = each.DefaultView; lineSeri.ValueMemberPath = "CHANGE"; lineSeri.XAxis = xAxis; lineSeri.YAxis = yAxis; lineSeri.Title = each.Rows[0]["TEST"].ToString(); lineSeri.Thickness = 3.0; xamDataChart1.Series.Add(lineSeri);
LineSeries lineSeri = new LineSeries();
lineSeri.ItemsSource = each.DefaultView;
lineSeri.ValueMemberPath = "CHANGE";
lineSeri.XAxis = xAxis;
lineSeri.YAxis = yAxis;
lineSeri.Title = each.Rows[0]["TEST"].ToString();
lineSeri.Thickness = 3.0;
xamDataChart1.Series.Add(lineSeri);
So I am trying to add tooltip with adding the below code below to my xaml that I wrote above;
<ig:XamDataChart.Series> <ig:LineSeries Name="lineSeri" ItemsSource="{Binding}" ValueMemberPath="CHANGE" XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}"> <ig:LineSeries.ToolTip> <StackPanel> <TextBlock Text="sadsa" /> <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <TextBlock Text="Date:" FontWeight="Bold" Grid.Row="0" Grid.Column="0" /> <TextBlock Text="sdfdsfd" Grid.Row="0" Grid.Column="1" /> <TextBlock Text="Sales:" FontWeight="Bold" Grid.Row="1" Grid.Column="0" /> <TextBlock Text="fgfdgfd" Grid.Row="1" Grid.Column="1" /> </Grid> </StackPanel> </ig:LineSeries.ToolTip> </ig:LineSeries> </ig:XamDataChart.Series>
<ig:XamDataChart.Series>
<ig:LineSeries Name="lineSeri"
ItemsSource="{Binding}"
ValueMemberPath="CHANGE"
XAxis="{Binding ElementName=xAxis}"
<ig:LineSeries.ToolTip>
<StackPanel>
<TextBlock Text="sadsa" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="Date:" FontWeight="Bold" Grid.Row="0" Grid.Column="0" />
<TextBlock Text="sdfdsfd" Grid.Row="0" Grid.Column="1" />
<TextBlock Text="Sales:" FontWeight="Bold" Grid.Row="1" Grid.Column="0" />
<TextBlock Text="fgfdgfd" Grid.Row="1" Grid.Column="1" />
</Grid>
</StackPanel>
</ig:LineSeries.ToolTip>
</ig:LineSeries>
</ig:XamDataChart.Series>
But as I said nothing happens when mouse over on graph
I am waiting for your replies
Thanks
Thank you for your post. I have been looking into it and I created a sample project for you using the code you have provided and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.