SciChart iOS v2.x API > ChartModifier API > Cursors, Tooltips and Legends > SCIRolloverModifier

SciChart provides several options for adding cursors and tooltips to the chart, again, using the versatile SCIChartModifierBase API

Examples for the RolloverModifier can be found in the SciChart iOS Examples Suite.


RolloverModifier – Time Series Tooltips on Tap Hover

Tooltips may be added to the SCIChartSurface using the SCIRolloverModifier. This is a SCIChartModifierBase derived type which is attached to the SCIChartSurface.ChartModifier property.

NOTE: The SCIRolloverModifier is specifically suited for time-series where X-values across many series are the same. For scatter charts, or irregular charts, please try the TooltipModifier.

Adding a RolloverModifier to a Chart – Code

The code to add a RolloverModifier in Objective C is as follows:

SCIRolloverModifier * rollover = [[SCIRolloverModifier alloc] init]; = CGSizeMake(200, NAN);
[rollover setModifierName:@"Rollover Modifier"];
[surface.chartModifiers add: rollover];
let rolloverModifier = SCIRolloverModifier()
rolloverModifier.modifierName = “rolloverModifierName” = CGSizeMake(200, CGFloat.NaN)

The Default RolloverMarker

The RolloverMarker is a small marker shown for each RenderableSeries which is currently being inspected.
By default SciChart sets a small ellipse marker with ellipse fill bound to the strokeColor.

Above you can see the default Rollover Marker for Orange and Green series respectively.

Styling the RolloverMarkerTemplate in Code

You can change the style of the Rollover Marker (the small ellipse at the intersection of Rollover Line and the series) as follows

    SCIEllipsePointMarker * marker = [[SCIEllipsePointMarker alloc]init]; [marker setWidth:20]; [marker setHeight:20];
     marker.strokeStyle = [[SCISolidPenStyle alloc] initWithColorCode:0xFF390032 withThickness:0.5];
     marker.fillStyle = [[SCISolidBrushStyle alloc] initWithColorCode:0xE1245120];
    SCIRolloverModifier * rollover = [SCIRolloverModifier new]; = CGSizeMake(200, NAN); = marker;
        let marker = SCIEllipsePointMarker()
         marker.width = 20
         marker.height = 20
         marker.strokeStyle = SCISolidPenStyle(colorCode:0xFF390032,withThickness:0.5)
         marker.fillStyle = SCISolidBrushStyle(colorCode:0xE1245120)
         let rolloverModifier = SCIRolloverModifier() = CGSize(width: 200, height: CGFloat.nan) = marker

Styling the Tooltip

SciChart by default has a number of Tooltip styles which are unique to the series type. To change the Tooltip style, use the SCIRolloverModifier.Style properties:

You can set Tooltip color, opacity, size (just like we did it in the previous section), spacing, etc.

See Also