drawValue method

  1. @override
void drawValue(
  1. Canvas c,
  2. String valueText,
  3. double x,
  4. double y,
  5. Color color,
  6. double? textSize,
  7. TypeFace? typeFace,
)
override

Draws the value of the given entry by using the provided IValueFormatter.

@param c canvas @param valueText label to draw @param x position @param y position @param color

Implementation

@override
void drawValue(Canvas c, String valueText, double x, double y, Color color,
    double? textSize, TypeFace? typeFace) {
  valuePaint = PainterUtils.create(valuePaint, valueText, color, textSize,
      fontFamily: typeFace?.fontFamily, fontWeight: typeFace?.fontWeight);
  valuePaint!.layout();
  valuePaint!
      .paint(c, Offset(x - valuePaint!.width / 2, y - valuePaint!.height));
}