I have a Splinearea chart with a customized tooltipStyle and two series.
Everything is dispalyed correctly. But if I add an ItemTooltipLayer to allow the simultaneous display of the two tooltips on rollover, the style seems to be no longer active: I see the default tooltip style for both the series.
Help on this issue will be appreciated.
at the end of the series:
<ig:ItemToolTipLayer
Canvas.ZIndex="11" UseInterpolation="True" TransitionDuration="0:00:00.1">
</ig:ItemToolTipLayer>
Chart ToolTip style:
<Style x:Key="DataChartToolTipStyle" TargetType="ContentControl">
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContentControl">
<Border CornerRadius="4" BorderThickness="1,1,1,1" BorderBrush="{StaticResource BurshToolTipBorder}" Background="{StaticResource BurshToolTipBackground}">
<StackPanel Orientation="Horizontal" Margin="2,2,2,2">
<ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" />
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Hello famproject,
Thank you for your post.
I imagine in this case, the "DataChartToolTipStyle" style that you have written is being applied to the XamDataChart.ToolTipStyle property, and so when you show your tooltips on the series, it is being respected.
When using an ItemTooltTipLayer, this tooltip style is not inherited from the XamDataChart, and the layers have a ToolTipStyle property of their own. If you would like to style the tooltips of your ItemToolTipLayer in the same way, I would recommend setting the ItemToolTipLayer.ToolTipStyle property to the same one as you are setting on your XamDataChart.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Thanks Andrew, got it.