iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SciChart iOS 3D Tutorial - Cursors and Tooltips

In the previous tutorials we’ve showed how to Create a Simple 3D Chart and add some Zoom and Rotate interaction via the Chart Modifiers 3D API.

In this SciChart iOS 3D tutorial we’re going show how to add a cursor and tooltip to that chart.

Getting Started

This tutorial is suitable for Objective-C, Swift and C# with Xamarin.iOS.

NOTE: Source code for this tutorial can be found at our Github Repository:

Let’s define what is Cursor ant Tooltip:

  • cursor ⁠— a tablet or cell phone obviously does not have a mouse. Instead the mouse is your finer and the cursor is where you place your finger. It appears as a small x (cross).
  • tooltip — is text that displays when you push the cursor onto an object, like a point plotted on a chart. You have to push the cursor onto the coordinate for the text to appear. In the case of the example below you probably need to use two fingers to zoom into the chart to make the points appear large enough so that you can see them.

The TooltipModifier3D

We can add more renderable on the surface by simple adding them into ISCIChartSurface3D.renderableSeries collection property. Similarly we can an add additional modifiers, such as a Tooltip Modifier 3D, which provides in SciChart.

In addition to modifiers we added in the previous tutorial, we are going to add SCITooltipModifier3D similarly, with the code below:

SCITooltipModifier3D *tooltipModifier = [SCITooltipModifier3D new]; tooltipModifier.crosshairMode = SCICrosshairMode_Lines; [self.surface.chartModifiers addAll:[[SCIOrbitModifier3D alloc] initWithDefaultNumberOfTouches:2], [SCIZoomExtentsModifier3D new], [SCIPinchZoomModifier3D new], nil]; [self.surface.chartModifiers add:tooltipModifier];
let tooltipModifier = SCITooltipModifier3D() tooltipModifier.crosshairMode = .lines self.surface.chartModifiers.add(items: SCIOrbitModifier3D(defaultNumberOfTouches: 2), SCIZoomExtentsModifier3D(), SCIPinchZoomModifier3D()) self.surface.chartModifiers.add(tooltipModifier)
Surface.ChartModifiers = new SCIChartModifier3DCollection { new SCIOrbitModifier3D(2), new SCIZoomExtentsModifier3D(), new SCIPinchZoomModifier3D(), new SCITooltipModifier3D { CrosshairMode = SCICrosshairMode.Lines } };

NOTE: We used defaultNumberOfTouches = 2 for SCIOrbitModifier3D to omit conflict while using TooltipModifier3D

Chart Modifiers 3D

Where to Go From Here?

You can download the final project from our GitHub Repository:

Also, you can found next tutorial from this series here - SciChart iOS 3D Tutorial - Plotting Realtime Data

Of course, this is not the maximum limit of what you can achieve with the SciChart iOS 3D. You can find more information about modifiers which are used in this tutorial in the articles below:

Finally, start exploring. The SciChart iOS is quite extensive. You can look into our SciChart iOS Examples Suite which are full of 2D and 3D examples, which are also available on our GitHub.