Hello,
How can I show the the tooltip (chart value) on a touchscreen, in the chart?
Hello Markus,
From my understanding the XamDataChart doesn't support Touch Gestures. You could invert the touch events to mouse events, as explained in the following post:
https://www.infragistics.com/community/forums/f/ultimate-ui-for-wpf/105328/xamdatachart-raises-no-previewmousedown-mousedown-event-when-using-a-touch-screen
Is it possible when I click (touch) on the chart serie, the tooltip appears?
If you press long enough Windows should cause the tooltips to display if the series already enabled tooltips, however it's longer than a couple seconds.
By default, the chart pans and zooms when touching which we've caused the tooltips to suppressed. This is one reason why we don't show tooltips initially when you touch the chart. You'll need to opt in to show tooltips with touches.
To enable touch-based tooltips you can either opt in to our default tooltips or use our Item/CategoryTooltipLayer.
For option 1, first you must access the Series and enable the property ShowDefaultTooltips to True, Next, enable IsDragCrosshairEnabled (exposed on the chart itself that will show the crosshair at the touch point) and show the tooltip. If you don't want a crosshair then you will have to remove the built in CrosshairLineStyle which is generating the crosshair lines.
For option 2, please visit our online documentation at: item or category tooltip layer for more details.
Let me know if you have any questions.
Thanks for the suggestions. The long press is not the behavior our customers want to have.
Is it possible to show the tooltip by mouse click? Our customers just want to click on the series to see the actual value.
Is this thread still watched?
Do you need to specify a click or would simply hovering the mouse suffice? By default all tooltips are triggered when hovering.The XamDataChat has built in annotation layers for crosshairs and tooltips.
Otherwise you would have to handle the chart's SeriesMouseLeftButtonDown and built you own tooltips.
Unfortunatelly, when there is a touch screen, hovering is not working. So I would need a mouse click event.
Can you provide a sample on how to invoke the tooltip, which is already designed in xaml? So I have the same tooltip when using the mouse hover and invoking by mouse click.
<ig:XamDataChart.Series> <ig:ColumnSeries ItemsSource="{Binding ObjectCountItems}" ValueMemberPath="Value" XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}" Thickness="1" Opacity="0.8"> <ig:ColumnSeries.ToolTip> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Grid.Column="0" Margin="0,0,5,0"> <Run Text="{x:Static l:lang.ObjectCountStatistic_Label_Objects}"/><Run Text=":"/> </TextBlock> <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Path=Item.Value}"/> <TextBlock Grid.Row="1" Grid.Column="0" Margin="0,0,5,0"> <Run Text="{x:Static l:lang.ChartStatistic_Label_Timestamp}"/><Run Text=":"/> </TextBlock> <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Path=Item.Timestamp, StringFormat={}{0:HH:mm:ss}}" /> </Grid> </ig:ColumnSeries.ToolTip> </ig:ColumnSeries>
Any news?
ShowDefaultTooltips is disregarded if you use a custom tooltip. You will have to use our Category or Item tooltip layer.
I strongly recommend downloading our samples browser to test these features:https://www.infragistics.com/products/wpf/download/samples_browser
Michael DiFilippoSoftware DeveloperInfragistics, Inc.
I already looked into the Sample Browser, but couldn't find any examples, where a custom (xaml) tooltip is shown in code.
My requirement is: When I click on the the chart series, my custom (xaml) tool tip should appear. Can you please point me to the sample code, or show me how to do it?
I attached a sample below.
CustomTooltipLayer.zip