drawText method

  1. @override
void drawText(
  1. Canvas canvas,
  2. KLineEntity data,
  3. double x
)
override

Implementation

@override
void drawText(Canvas canvas, KLineEntity data, double x) {
  //长按显示按中的数据
  if (isLongPress || (isTapShowInfoDialog && isOnTap)) {
    var index = calculateSelectedX(selectX);
    data = getItem(index);
  }
  //松开显示最后一条数据
  mMainRenderer.drawText(canvas, data, x);
  mVolRenderer?.drawText(canvas, data, x);
  mSecondaryRenderer?.drawText(canvas, data, x);
}