drawText method
Implementation
@override
void drawText(Canvas canvas, VolumeEntity data, double x) {
TextSpan span = TextSpan(
children: [
TextSpan(
text: "VOL:${NumberUtil.format(data.vol)} ",
style: getTextStyle(this.chartColors.volColor)),
if (data.MA5Volume.notNullOrZero)
TextSpan(
text: "MA5:${NumberUtil.format(data.MA5Volume!)} ",
style: getTextStyle(this.chartColors.ma5Color)),
if (data.MA10Volume.notNullOrZero)
TextSpan(
text: "MA10:${NumberUtil.format(data.MA10Volume!)} ",
style: getTextStyle(this.chartColors.ma10Color)),
],
);
TextPainter tp = TextPainter(text: span, textDirection: TextDirection.ltr);
tp.layout();
tp.paint(canvas, Offset(x, chartRect.top - topPadding));
}