SciChartOne and sciChartTwo are bound to each other through AxisTitle.
However, I now need to display only the modified AxisLabelContainerStyle and AxisLabelTemplate when the mouse cursor is on SciChartOne. I noticed that besides the XAxis setting’s Style, there is also a default Style present, resulting in an orange label with a default green label underneath.
Could you please advise on how to completely override the green label when the mouse cursor is selected on this chart for SciChartOne?
Additionally, if the mouse cursor is not selected on this chart, I would like the XAxis to display a blue label.
Chart Code:(Both are the same)
<Style x:Key="CursorLineStyle" TargetType="Line">
<Setter Property="StrokeThickness" Value="2"></Setter>
<Setter Property="Stroke" Value="Red"></Setter>
<Setter Property="StrokeDashArray" Value="2 2"></Setter>
</Style>
<Style x:Key="CursorModAxisLabelStyle" TargetType="s:AxisLabelControl">
<Setter Property="Background" Value="#AAFF6600"></Setter>
<Setter Property="BorderBrush" Value="#FFFF6600"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
</Style>
<DataTemplate x:Key="CursorModAxisLabelTemplate" DataType="s:AxisInfo">
<StackPanel>
<TextBlock Foreground="White" FontFamily="Arial" FontSize="11" Margin="2" Text="{Binding DataValue, StringFormat='{}{0:0.00}'}"></TextBlock>
</StackPanel>
</DataTemplate>
<s:SciChartSurface.XAxis>
<s:NumericAxis AxisTitle="{Binding XAxisTitle}" s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}" s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}" VisibleRange="{Binding SharedXVisibleRange, Mode=TwoWay}"></s:NumericAxis>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}" s:MouseManager.MouseEventGroup="myCustomGroup">
<s:RubberBandXyZoomModifier IsEnabled="{Binding EnableZoom}"></s:RubberBandXyZoomModifier>
<s:ZoomPanModifier IsEnabled="{Binding EnablePan}" ClipModeX="None"></s:ZoomPanModifier>
<s:ZoomExtentsModifier></s:ZoomExtentsModifier>
<s:LegendModifier ShowLegend="True" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center"></s:LegendModifier>
<s:RolloverModifier ShowTooltipOn="MouseHover"></s:RolloverModifier>
<s:CursorModifier LineOverlayStyle="{StaticResource CursorLineStyle}"></s:CursorModifier>
<s:XAxisDragModifier DragMode="Pan"></s:XAxisDragModifier>
<s:YAxisDragModifier DragMode="Scale"></s:YAxisDragModifier>
<s:MouseWheelZoomModifier></s:MouseWheelZoomModifier>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
- allen chuang asked 2 months ago
- last edited 2 months ago
-
Hi Allen, Thanks for your inquiry. Unfortunately, the reported issue is not clear enough. Could you please prepare a small sample project reproducing the described behavior and send us for investigation? Please also provide us with detailed steps to reproduce this issue. Thanks in advance, Lex, SciChart Technical Support Engineer
-
Hello, I have updated the program.
-
Hello Allen, Hope you are doing well. I am sorry for the late response. I managed to reproduce the reported issue in the shared sample project and logged it in our tracking system for further investigation. We’ll get back to you as soon as we have an update. Kind regards, Lex, SciChart Technical Support Engineer
- You must login to post comments
Hello, I have updated the program.
- allen chuang answered 2 months ago
- last edited 2 months ago
- You must login to post comments
Please login first to submit.