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

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’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?


0 votes

I am trying out JS SciChart based on the Blazor example you have posted more than a year ago.
I cannot get the auto scaling to work by code (the default behavior does auto scale once right after adding the data). Calling sciChartSurface.zoomExtents(); (or zoomExtentsX() and zoomExtentsY() after one another) does zoom into a very details portion of the graph.

Also (maybe related) the tooltip does not update when moving the cursor around, it always keeps the same data. I tried using CursorModifier as well as RolloverModifier, both having the same problem.

Attached the JS code and the c# files and a picture how this looks like after calling the autoScale() method.

Thanks for any help

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

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

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 3 years ago
  • last active 3 years ago
0 votes


I want to use a CursorModifier that snaps to series, but not all series. I can see the BaseRenderableSeriesViewModel has, for example, IncludeTooltipModifier, but there is no IncludeCursorModifier property so I haven’t been able to get it to work out of the box.
Is this a missing feature?

Are there any work arounds? I was thinking of adding metadata to a series, but there is no metadata for the entire series, just a metadata for the point markers.

I also tried to create a class that inherits from, for example, LineRenderableSeriesViewModel, that has an IncludeCursorModifier, or similarly named property. The issue I had with that is that when I create my own inherited version of CursorModifer I only have access to the ParentSurface?.RenderableSeries which is not the ViewModel version of the series, and thus that information seems to be lost – I can’t cast a member of RenderableSeries to my custom MyLineRenderableSeriesViewModel, thus I can’t inspect whether it should be included in the cursor modifier.

I appreciate the help.


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