SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes


I’m using the crosshair on the chart and i want to crosshair disappear as soon as i start pinch zoom. So I created a custom PinchZoomModifier and i am doing cursorModifier.setIsEnabled (false) on the onScaleBegin override. But the crosshair does not disappear, it remains steady on the chart, even if I move the chart, it stays at the same point. How can I make crosshair passive when I pinch zoom?


1 vote

I am trying to modify the 3D Charts > Tooltips and Hit Test 3D Charts > Series Tooltips 3D Chart example to change the colour of the tooltip crosshairs to red. By crosshairs I mean the green lines in the image attached.

Green Crosshairs

I modified SeriesTooltips3DChart.xaml by adding:

        <Style x:Key="MyCrosshairOverlayStyle" TargetType="Line">
            <Setter Property="Stroke" Value="Red" />
            <Setter Property="StrokeThickness" Value="2" />
        <Style x:Key="MyCrosshairProjectionStyle" TargetType="t3D:CrosshairLines">
            <Setter Property="CrosshairOverlayStyle" Value="{StaticResource MyCrosshairOverlayStyle}" />
            <Setter Property="ProjectionMode" Value="Crosshair" />

and modifying the TooltipModifier3D element:

<t3D:TooltipModifier3D CrosshairMode="Lines" CrosshairPlanesFill="#33FF6600" CrosshairProjectionStyle="{StaticResource MyCrosshairProjectionStyle}" />

I expected this to apply the coloured lines but it did not. What have I misunderstood?

0 votes

I am using a custom CursorModifier class in my WPF code. I have created a class inherited from CursorModifier for this purpose. Now I want to apply cross-hair cursor style to my chart. The style in XAML is not getting applied at all. However, when I use the CursorModifier directly (instead of custom modifier class) in XAML, then it applies.

If I changed the TargetType to “loca:MyCursorModifier”, then it gives error “The memeber StrokeThickness is not recognized” & “The “memeber Stroke is not recognized”.

    <Style x:Key="CrossLineStyle" TargetType="Line">
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Stroke" Value="Black " />

<local:MyCursorModifier ShowTooltip="False" ShowTooltipOn="Never" ShowAxisLabels="False" SourceMode="AllSeries" LineOverlayStyle="{StaticResource CursorLineStyle}"/>
  • Anil Soman asked 12 months ago
  • last active 12 months ago
0 votes

So I want to draw multiple charts so is there any way I can have stacked yAxes like yAxis 2 should be drawn below yAxis1. I have gone through your example and there I got that we can add multiple surface but its becoming difficult for us to show a crosshair on all surfaces since we have a custom cross hair. Can you guide on same. Thanks in advance

0 votes

Hey again!

Is there kind of a delegate that notify me if the user uses the crosshair/SCIRolloverModifier?
I want to know which value he is inspecting to show him further information outside the chart for this datapoint.

Thanks and Greeting

Showing 5 results
This template supports the sidebar's widgets. Add one or use Full Width layout.