SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
Hey guys,
A quick one; is there a way I can hide the tooltip that the RolloverModifier displays on the XAxis when it is in use? This has nothing to do with the regular RolloverTemplate tooltip or hit-testing data points.
Screenshot attached to be clear đŸ™‚
Thanks,
Miles
PS bonus question: can I style what it looks like? I might want to tweak the background colour or something later on, but for now just removing it for one of my Charts is the hurdle I need to jump over đŸ™‚
Yes, you can set ShowAxisLabels=False.
This was a requested feature so we added it in. To style the axis label you will need to set RolloverModifier.AxisLabelTemplate. An example can be found below:
<DataTemplate x:Key="AxisLabelTemplate" DataType="r:AxisInfo"> <Border Margin="1" Background="{Binding Path=CursorLabelBackgroundBrush, Source={x:Static s:ThemeManager.ThemeProvider}}" BorderBrush="{Binding Path=CursorLabelBorderBrush, Source={x:Static s:ThemeManager.ThemeProvider}}" BorderThickness="1" CornerRadius="2"> <TextBlock Text="{Binding CursorFormattedDataValue}" /> </Border> </DataTemplate>
Thanks!
Andrew
Hi there,
You need to use the AxisInfoTemplateSelector object and an empty DataTemplate. The following code shows how AxisLabelTemplate is defined by default:
<ControlTemplate x:Key="RolloverAxisLabelTemplate" TargetType="r:TemplatableControl"> <s:AxisInfoTemplateSelector Content="{Binding}" XAxisDataTemplate="{StaticResource AxisLabelTemplate}" YAxisDataTemplate="{StaticResource EmptyDataTemplate}" /> </ControlTemplate>
Please, try it and let us know if this helps!
Best regards,
Yuriy
Please login first to submit.