getLabelSize method
Implementation
Size getLabelSize({required TextStyle textStyle, required double? value}) {
final TextSpan textSpan =
TextSpan(text: value!.toInt().toString(), style: textStyle);
_textPainter.text = textSpan;
_textPainter.layout();
return Size(_textPainter.width, _textPainter.height);
}