getTextPainter method
Implementation
TextPainter getTextPainter(text, color) {
if (color == null) {
color = this.chartColors.defaultTextColor;
}
TextSpan span = TextSpan(text: "$text", style: getTextStyle(color));
TextPainter tp = TextPainter(text: span, textDirection: TextDirection.ltr);
tp.layout();
return tp;
}