Pre loader

Tooltip fail to disappear when we move the cursor fast while the chart object is in a scrollable view

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


We have a sciChart surface in a fragment that has a scrollable view. We enabled tooltips using custom cursor modifier on the sci chart to show the values as the selection (touching a point in the chart object).

When we are moving the selection on x-axis tooltip sometimes it works fine and disappears when the selection is taken out. But sometimes it get freezed. At the same time, if we touch and move the selection in a vertical axis, tooltip box gets stuck and does not disappear even when the selection is taken out.

Tried so far:
We tried to replicate the issue in landscape mode and it works fine.
If we make the chart object to the whole page view, tool tips appears and disappears as expected.
But when the same used in portrait mode as a part of fragment (50% of screen) , problem arises

Steps to reproduce:
Have a chart object in a scrollable view.
Make sure the chart object doesnot appear on the fully screen without scrolling.
Now scroll to see the chart object.
Try to see the tooltip and move the selection in vertical axis.

  • You must to post comments

@Andrew Burnett-Thompson

Code for the above issue:

Xml file:








package com.scichart.examples

import android.content.Context
import android.os.Bundle
import android.text.SpannableStringBuilder
import android.util.TypedValue
import com.scichart.charting.modifiers.CursorModifier
import com.scichart.charting.numerics.labelProviders.NumericLabelProvider
import com.scichart.charting.visuals.SciChartSurface
import com.scichart.charting.visuals.axes.AxisAlignment
import com.scichart.charting.visuals.renderableSeries.hitTest.DefaultXySeriesInfoProvider
import com.scichart.charting.visuals.renderableSeries.hitTest.XySeriesInfo
import com.scichart.charting.visuals.renderableSeries.tooltips.ISeriesTooltip
import com.scichart.charting.visuals.renderableSeries.tooltips.XySeriesTooltip
import com.scichart.core.utility.StringUtil
import com.scichart.drawing.utility.ColorUtil
import com.scichart.examples.utils.Constant
import com.scichart.examples.utils.TextLabelFormatter
import com.scichart.examples.utils.interpolator.DefaultInterpolator
import com.scichart.examples.utils.scichartExtensions.*
import kotlin.math.roundToInt

class SciActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
val surfacevalue= findViewById(

val randomWalkGenerator = RandomWalkGenerator()
val data1 = randomWalkGenerator.getRandomWalkSeries(POINTS_COUNT)

surfacevalue.suspendUpdates {
xAxes { numericAxis() }
yAxes { numericAxis() }

renderableSeries {
fastLineRenderableSeries {
xyDataSeries<Double, Double>(“Series #1”) {
append(data1.xValues, data1.yValues)
strokeStyle = SolidPenStyle(0xffae418d, 2f)
seriesInfoProvider = CustomSeriesInfoProvider()



val cursorModifier = CursorModifier(R.layout.example_custom_cursor_modifier_tooltip_container).apply {
val thickness = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2f, resources.displayMetrics)
SolidPenStyle(0xAA47bde6, thickness).initPaint(crosshairPaint)

chartModifiers { modifier(cursorModifier) }

private class CustomSeriesInfoProvider : DefaultXySeriesInfoProvider() {
override fun getSeriesTooltipInternal(context: Context, seriesInfo: XySeriesInfo<>?, modifierType: Class<>): ISeriesTooltip {
return when (modifierType) { -> { CustomXySeriesTooltip(context, seriesInfo) }
else -> { super.getSeriesTooltipInternal(context, seriesInfo, modifierType) }

private class CustomXySeriesTooltip(context: Context?, seriesInfo: XySeriesInfo<*>?) : XySeriesTooltip(context, seriesInfo) {
init {
val displayMetrics = resources.displayMetrics
val padding = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1f, displayMetrics).roundToInt()
setPadding(padding, padding, padding, padding)

override fun internalUpdate(seriesInfo: XySeriesInfo<*>) {
val sb = SpannableStringBuilder()
seriesInfo.seriesName?.run {
sb.append(“X: “).append(seriesInfo.formattedXValue)
sb.append(” Y: “).append(seriesInfo.formattedYValue)
text = sb


companion object {
private const val POINTS_COUNT = 200


Drive link for Video:

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies