SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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.
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.
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
Image didn’t want to attach, trying again….
Please login first to submit.