Background: I have a chart with a data source. This chart has a tooltip enabled so that when a user presses one of the points (line, bar, etc), the tooltip shows.
Question: Can I have two tooltips hovering over the minimum and maximum values of the data? I have these values, but I would like a tooltip for both at the same time on the chart indicating them to the user.
Additionally, I would like the user to be able to press one of the points on the chart and the min/max tooltips to go away, and reappear when the user’s choice times out. I understand that this will involve working with the OnClick event or whatever it’s called.
Thanks in advance.
<DataTemplate x:Key="template">
<StackLayout Orientation="Vertical">
<StackLayout Orientation="Horizontal">
<Label Text="Minimum :" />
<Label Text="{Binding Value1}"/>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label Text="Maximum :" />
<Label Text="{Binding Value2}"/>
</StackLayout>
</StackLayout>
</DataTemplate>
- -
<chart:LineSeries ItemsSource="{Binding LineData1}" XBindingPath="XValue" YBindingPath="Value1" EnableTooltip="True" TooltipTemplate="{StaticResource template}">
</chart:LineSeries> |
<chart:SfChart.ChartBehaviors>
<chart:ChartTrackballBehavior ShowLine="False" />
</chart:SfChart.ChartBehaviors> |
tooltipBehavior.Show(pointX, pointY, true);
- -
tooltip.Hide(true); |