iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

SCITooltipModifier

Tooltips may be added to the SCIChartSurface using the SCITooltipModifier.

NOTE: The SCITooltipModifier is specifically suited for scatter X-Y data, although it may be used for any type of data in SciChart.

Tooltip Modifier

NOTE: Examples of the SCITooltipModifier usage can be found in the SciChart iOS Examples Suite as well as on GitHub:

SCITooltipModifier Usage

The SCITooltipModifier allows inspecting RenderableSeries at a touch point. For convenience, the actual hit-test point is located a bit upper. It is marked with a small “X” sign. Tooltips will appear to the side of it, showing the hit-test result for all RenderableSeries at the “X” location:

Tooltip Modifier Usage

For hit-testing series parts that are close to the chart boundaries, a multi-touch finger drag can be used:

Tooltip Modifier Usage Near Edge

SCITooltipModifier Features

Besides the SCITooltipModifier specific features, there are some common features which are shared between SCITooltipModifier, SCIRolloverModifier and SCICursorModifier via common SCITooltipModifierBase class.

Common Features

Feature Description
SCITooltipModifierBase.showTooltip Allows to hide or show modifier’s Tooltips.
SCITooltipModifierBase.useInterpolation Allows to show interpolated values between data points. It is set to YES by default. If NO - modifier’s Tooltips will report the info about closest data points.
SCITooltipModifierBase.sourceMode Allows to specify which ISCIRenderableSeries are to be inspected by a modifier, e.g. Visible, Selected, etc. Other will be ignored by the modifier. Expects a member of the SCISourceMode enumeration.

Specific Features

Feature Description
SCITooltipModifier.offset Specifies how far the hit-test point is from the actual touch point. This value will be used for either X or Y coordinate, or both, depending on markerPlacement.
SCITooltipModifier.customPointOffset Specifies how far the hit-test point is from the actual touch point. As opposed to offset, both X and Y coordinate will always be applied.
SCITooltipModifier.markerPlacement Allows to specify the position of the hit-test point relative to the touch point, e.g. Left, Top, etc… Expects a member of the SCIPlacement enumeration.
SCITooltipModifier.tooltipPosition Allows to specify the position of modifier’s Tooltips relative to the hit-test point, e.g. TopLeft, BottomRight, etc…. Expects a member of the SCITooltipPosition enumeration.
SCITooltipModifier.tooltipPointMarkerPaintStyle Allows to specify SCIPenStyle which will be used to draw “X” marker

Adding a SCITooltipModifier to a Chart

Any Chart Modifier can be added to a SCIChartSurface via theISCIChartSurface.chartModifiers property and SCITooltipModifier with no difference:

// Assume a surface has been created and configured somewhere id<ISCIChartSurface> surface; // Create a Modifier and add modifier to the surface [self.surface.chartModifiers add:[SCITooltipModifier new]];
// Assume a surface has been created and configured somewhere let surface: ISCIChartSurface // Create a Modifier and add modifier to the surface self.surface.chartModifiers.add(SCITooltipModifier())
// Assume a surface has been created and configured somewhere IISCIChartSurface surface; // Create a Modifier and add modifier to the surface Surface.ChartModifiers.Add(new SCITooltipModifier());

NOTE: To learn more about features available, please visit the Chart Modifier APIs article.