drawText method

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

draw text

Implementation

@override
void drawText(Canvas canvas, KLineEntity data, double x) {
  //Long press to display the data in the press
  if (isLongPress || (isTapShowInfoDialog && isOnTap)) {
    var index = calculateSelectedX(selectX);
    data = getItem(index);
  }
  //Release to display the last data
  mMainRenderer.drawText(canvas, data, x);
  mVolRenderer?.drawText(canvas, data, x);
  mSecondaryRendererList.forEach((element) {
    element.drawText(canvas, data, x);
  });
}