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

Answered
1
0

Hi,

I can’t for the life of me work out how to do this!

We’re using vertical markers to show particular points of data on the graph. It all works fine, except there is a hovering ‘tooltip’ style on the chart surface (see image – the zero next to the marker dot).

Here is the initialisation of the markers: (slightly condensed)

        VerticalLineAnnotation newMarker = new VerticalLineAnnotation();

        newMarker.ShowLabel = true;
        newMarker.Stroke = Brushes.Red;
        newMarker.StrokeThickness = 4.0;
        newMarker.IsEditable = true;
        newMarker.LabelPlacement = LabelPlacement.Axis;
        newMarker.DragDelta += Marker_DragUpdate;
        newMarker.DragEnded += Marker_DragUpdate;
        if (!Value.HasValue)
          newMarker.X1 = Value.Value;

        GraphMarkers.Add(newMarker);

GraphMarkers is a property that is bound through our view model.

Kind Regards,

Simon.

  • You must to post comments
Great Answer
1
0

Ok thanks.

Just to clarify with a quick example to anyone who’s reading this in the future:

In the window xaml:

...
<s:SciChartSurface.ChartModifier>
    <s:ModifierGroup>
         <s:VerticalSliceModifier x:Name="GraphMarkersSlice" />
    </s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
...

In the window class:

public MainWindow()
{
    // ...
    GraphMarkersSlice.TooltipLabelTemplate = new ControlTemplate();
    // ...
}

Gives the attached image.

Thanks! 🙂

Simon.

Images
  • You must to post comments
Good Answer
2
0

Just so summarize the comments above – the VerticalLineAnnotation does not provide the tooltip marker by default, so to use this, you need to use the VerticalSliceModifier.

There is a demonstration here: Series Vertical Slices Example

There are also some options here which can help configure the appearance of tooltips, or when they appear with the VerticalSliceModifier: Hiding VerticalSliceModifier Tooltips

Best regards,
Andrew

  • You must to post comments
0
0

Image didn’t want to attach, trying again….

Images
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.