fromStrings static method

FixedAxis<int> fromStrings(
  1. List<String> values, {
  2. TextStyle? textStyle,
  3. double? margin,
  4. double? marginStart,
  5. double? marginEnd,
  6. PdfColor? color,
  7. double? width,
  8. bool? divisions,
  9. double? divisionsWidth,
  10. PdfColor? divisionsColor,
  11. bool? divisionsDashed,
  12. bool? ticks,
  13. bool? axisTick,
  14. double angle = 0,
  15. GridAxisBuildLabel? buildLabel,
})

Implementation

static FixedAxis<int> fromStrings(
  List<String> values, {
  TextStyle? textStyle,
  double? margin,
  double? marginStart,
  double? marginEnd,
  PdfColor? color,
  double? width,
  bool? divisions,
  double? divisionsWidth,
  PdfColor? divisionsColor,
  bool? divisionsDashed,
  bool? ticks,
  bool? axisTick,
  double angle = 0,
  GridAxisBuildLabel? buildLabel,
}) {
  return FixedAxis<int>(
    List<int>.generate(values.length, (int index) => index),
    format: (num v) => values[v.toInt()],
    textStyle: textStyle,
    margin: margin,
    marginStart: marginStart,
    marginEnd: marginEnd,
    color: color,
    width: width,
    divisions: divisions,
    divisionsWidth: divisionsWidth,
    divisionsColor: divisionsColor,
    divisionsDashed: divisionsDashed,
    ticks: ticks,
    axisTick: axisTick,
    angle: angle,
    buildLabel: buildLabel,
  );
}