measureChartText function

double measureChartText(
  1. String text, {
  2. double fontSize = 9,
  3. FontWeight weight = FontWeight.normal,
  4. Color color = const Color(0xFF000000),
})

The laid-out pixel width of text in the chart label style, using the same cache as drawChartText. Lets renderers de-overlap axis labels by measured width (via LabelLayout.thin) instead of guessing a stride.

Implementation

double measureChartText(
  String text, {
  double fontSize = 9,
  FontWeight weight = FontWeight.normal,
  Color color = const Color(0xFF000000),
}) => _layoutLabel(text, color, fontSize, weight).width;