There are several modes that can be used to position a sub-surface, they are defined in the ECoordinateMode enum.
By default, sub-surfaces use ECoordinateMode.Relative for positioning. To change the coordinate mode use I2DSubSurfaceOptions.coordinateMode or SciChartSubSurface.coordinateMode property.
So we can update our basic example as following:
This places a chart-within-a-chart at a specific DataValue.
Next let's look at the case where we have a custom axis id or multiple axes on main surface.
Since positioning with ECoordinateMode.DataValue depends on the axis visible ranges, we will have to specify which axes should be used for sub-surface position calculation.
To do this we can pass I2DSubSurfaceOptions.parentXAxisId / I2DSubSurfaceOptions.parentYAxisId via options or use SciChartSubSurface.parentXAxisId / SciChartSubSurface.parentYAxisId properties.
TODO IMAGE REQUIRED
Updating SubChart Position
SciChart allows to change a sub-surface position dynamically using the SciChartSubSurface.subPosition property.
Let's demonstrate this by updating the coordinate mode and subPosition of the sub-chart from previous section
This will move and resize the Sub Chart: