Class TooltipModifier
The TooltipModifier provides a touch-over tooltip to a chart, outputting a singleSeriesInfo object to bind to which updates as the touch moves over data-points Add to a SciChartSurface and set TooltipModifier#setIsEnabled(boolean) to True to enable this behaviour. See Also: CursorModifier, RolloverModifier
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class TooltipModifier extends TooltipModifierBase
Constructors
TooltipModifier()
Creates a new instance of the TooltipModifier class.
Declaration
public TooltipModifier()
TooltipModifier(CrossDrawableBehavior<?> crossDrawableBehavior)
Creates a new instance of the TooltipModifier class with the DrawableBehavior instance.
Declaration
public TooltipModifier(CrossDrawableBehavior<?> crossDrawableBehavior)
Parameters
Type | Name | Description |
---|---|---|
CrossDrawableBehavior<?> | crossDrawableBehavior | The DrawableBehavior instance which will be use to show marker which will identify what point will be Hit-tested. |
TooltipModifier(CrossDrawableBehavior<?> crossDrawableBehavior, int tooltipContainerLayoutResId)
Creates a new instance of the TooltipModifier class.
Declaration
public TooltipModifier(CrossDrawableBehavior<?> crossDrawableBehavior, int tooltipContainerLayoutResId)
Parameters
Type | Name | Description |
---|---|---|
CrossDrawableBehavior<?> | crossDrawableBehavior | The DrawableBehavior instance which will be use to show marker which will identify what point will be Hit-tested. |
int | tooltipContainerLayoutResId | The layout resource id which will be used to inflate tooltip container. |
TooltipModifier(TooltipBehavior<?> tooltipBehavior, CrossDrawableBehavior<?> crossDrawableBehavior)
Creates a new instance of the TooltipModifier class.
Declaration
protected TooltipModifier(TooltipBehavior<?> tooltipBehavior, CrossDrawableBehavior<?> crossDrawableBehavior)
Parameters
Type | Name | Description |
---|---|---|
TooltipBehavior<?> | tooltipBehavior | The TooltipBehavior which will be associated with this modifier. |
CrossDrawableBehavior<?> | crossDrawableBehavior | The DrawableBehavior instance which will be use to show marker which will identify what point will be Hit-tested. |
Methods
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
Declaration
public void applyThemeProvider(IThemeProvider themeProvider)
Parameters
Type | Name | Description |
---|---|---|
IThemeProvider | themeProvider |
Overrides
attachTo(IServiceContainer services)
Declaration
public void attachTo(IServiceContainer services)
Parameters
Type | Name | Description |
---|---|---|
IServiceContainer | services |
Overrides
clearAll()
When overridden in a derived class, this method should clear all markers and tooltips from the SciChartSurface#getModifierSurface().
Declaration
protected void clearAll()
Overrides
detach()
Declaration
public void detach()
Overrides
getCustomPointOffset()
Gets the PointF value which will replace #getOffset() and will be used to shift tooltip and the marker in custom x and y directions.
Declaration
public PointF getCustomPointOffset()
Returns
Type | Description |
---|---|
android.graphics.PointF | The custom PointF offset to shift tooltip. |
getMarkerPlacement()
Gets the Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point.
Declaration
public Placement getMarkerPlacement()
Returns
Type | Description |
---|---|
Placement | The one of the Placement modes, to place tooltip properly. |
getOffset()
Gets the offset on which tooltip and the marker will be shifted in x and y directions.
Declaration
public float getOffset()
Returns
Type | Description |
---|---|
float | The offset on which tooltip and the marker will be shifted in x and y directions. |
getTooltipPointMarkerPaint()
Gets the Paint instance which will be used by CrossDrawableBehavior do draw the marker.
Declaration
public final Paint getTooltipPointMarkerPaint()
Returns
Type | Description |
---|---|
android.graphics.Paint | The Paint instance which will be used by CrossDrawableBehavior do draw the marker. |
getTooltipPosition()
Gets the TooltipPosition mode, to determine where to place tooltip relatively to the marker.
Declaration
public TooltipPosition getTooltipPosition()
Returns
Type | Description |
---|---|
TooltipPosition | The one of the TooltipPosition modes, to place tooltip properly. |
handleMasterTouchDownEvent(PointF point)
When overridden in a derived class, called to handle the Master ChartModifierBase MotionEvent#ACTION_DOWN
Declaration
protected void handleMasterTouchDownEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
handleMasterTouchMoveEvent(PointF point)
When overridden in a derived class, called to handle the Master ChartModifierBase MotionEvent#ACTION_MOVE
Declaration
protected void handleMasterTouchMoveEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
handleMasterTouchUpEvent(PointF point)
When overridden in a derived class, called to handle the Master ChartModifierBase MotionEvent#ACTION_UP
Declaration
protected void handleMasterTouchUpEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
setCustomPointOffset(PointF customPointOffset)
Sets the PointF value which will replace #getOffset() and will be used to shift tooltip and the marker in custom x and y directions.
Declaration
public void setCustomPointOffset(PointF customPointOffset)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | customPointOffset | The new PointF value which will replace #getOffset() and will be used to shift tooltip and the marker in custom x and y directions. |
setMarkerPlacement(Placement markerPlacement)
Sets the Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point.
Declaration
public void setMarkerPlacement(Placement markerPlacement)
Parameters
Type | Name | Description |
---|---|---|
Placement | markerPlacement | The new Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point. |
setOffset(float offset)
Sets the offset on which tooltip and the marker will be shifted in x and y directions.
Declaration
public void setOffset(float offset)
Parameters
Type | Name | Description |
---|---|---|
float | offset | Value which indicates the offset on which tooltip and the marker will be shifted in x and y directions. |
setTooltipPosition(TooltipPosition tooltipPosition)
Sets the TooltipPosition mode, to determine where to place tooltip relatively to the marker.
Declaration
public void setTooltipPosition(TooltipPosition tooltipPosition)
Parameters
Type | Name | Description |
---|---|---|
TooltipPosition | tooltipPosition | The new TooltipPosition mode, to determine where to place tooltip relatively to the marker. |
updateCurrentPoint(PointF currentPoint, ModifierTouchEventArgs args)
Updates the passed in current point when one of the following methods was called: MasterSlaveTouchModifierBase#onTouchDown(ModifierTouchEventArgs), MasterSlaveTouchModifierBase#onTouchMove(ModifierTouchEventArgs), MasterSlaveTouchModifierBase#onTouchUp(ModifierTouchEventArgs).
Declaration
protected boolean updateCurrentPoint(PointF currentPoint, ModifierTouchEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | currentPoint | |
ModifierTouchEventArgs | args |
Returns
Type | Description |
---|---|
boolean |