CategoryAxis constructor

const CategoryAxis({
  1. Key? key,
  2. String? name,
  3. bool isVisible = true,
  4. AxisTitle title = const AxisTitle(),
  5. AxisLine axisLine = const AxisLine(),
  6. bool arrangeByIndex = false,
  7. ChartRangePadding rangePadding = ChartRangePadding.auto,
  8. LabelPlacement labelPlacement = LabelPlacement.betweenTicks,
  9. EdgeLabelPlacement edgeLabelPlacement = EdgeLabelPlacement.none,
  10. ChartDataLabelPosition labelPosition = ChartDataLabelPosition.outside,
  11. TickPosition tickPosition = TickPosition.outside,
  12. int labelRotation = 0,
  13. AxisLabelIntersectAction labelIntersectAction = AxisLabelIntersectAction.hide,
  14. LabelAlignment labelAlignment = LabelAlignment.center,
  15. bool isInversed = false,
  16. bool opposedPosition = false,
  17. int maximumLabels = 3,
  18. MajorTickLines majorTickLines = const MajorTickLines(),
  19. MajorGridLines majorGridLines = const MajorGridLines(),
  20. TextStyle? labelStyle,
  21. double? plotOffset,
  22. double? plotOffsetStart,
  23. double? plotOffsetEnd,
  24. double initialZoomFactor = 1,
  25. double initialZoomPosition = 0,
  26. InteractiveTooltip interactiveTooltip = const InteractiveTooltip(),
  27. double? minimum,
  28. double? maximum,
  29. double? interval,
  30. double? initialVisibleMinimum,
  31. double? initialVisibleMaximum,
  32. dynamic crossesAt,
  33. String? associatedAxisName,
  34. bool placeLabelsNearAxisLine = true,
  35. List<PlotBand> plotBands = const <PlotBand>[],
  36. int? desiredIntervals,
  37. RangeController? rangeController,
  38. double? maximumLabelWidth,
  39. double? labelsExtent,
  40. int? autoScrollingDelta,
  41. double borderWidth = 0.0,
  42. Color? borderColor,
  43. AxisBorderType axisBorderType = AxisBorderType.rectangle,
  44. MultiLevelLabelFormatterCallback? multiLevelLabelFormatter,
  45. MultiLevelLabelStyle multiLevelLabelStyle = const MultiLevelLabelStyle(),
  46. List<CategoricalMultiLevelLabel>? multiLevelLabels,
  47. AutoScrollingMode autoScrollingMode = AutoScrollingMode.end,
  48. ChartLabelFormatterCallback? axisLabelFormatter,
  49. dynamic onRendererCreated(
    1. CategoryAxisController
    )?,
})

Creating an argument constructor of CategoryAxis class.

Implementation

const CategoryAxis({
  super.key,
  super.name,
  super.isVisible,
  super.title,
  super.axisLine,
  this.arrangeByIndex = false,
  super.rangePadding,
  this.labelPlacement = LabelPlacement.betweenTicks,
  super.edgeLabelPlacement,
  super.labelPosition,
  super.tickPosition,
  super.labelRotation,
  super.labelIntersectAction,
  super.labelAlignment,
  super.isInversed,
  super.opposedPosition,
  super.maximumLabels,
  super.majorTickLines,
  super.majorGridLines,
  super.labelStyle,
  super.plotOffset,
  super.plotOffsetStart,
  super.plotOffsetEnd,
  super.initialZoomFactor,
  super.initialZoomPosition,
  super.interactiveTooltip,
  this.minimum,
  this.maximum,
  super.interval,
  this.initialVisibleMinimum,
  this.initialVisibleMaximum,
  super.crossesAt,
  super.associatedAxisName,
  super.placeLabelsNearAxisLine,
  super.plotBands,
  super.desiredIntervals,
  super.rangeController,
  super.maximumLabelWidth,
  super.labelsExtent,
  super.autoScrollingDelta,
  super.borderWidth,
  super.borderColor,
  super.axisBorderType,
  super.multiLevelLabelFormatter,
  super.multiLevelLabelStyle,
  this.multiLevelLabels,
  super.autoScrollingMode,
  super.axisLabelFormatter,
  this.onRendererCreated,
}) : assert(
          (initialVisibleMaximum == null && initialVisibleMinimum == null) ||
              autoScrollingDelta == null,
          'Both properties have the same behavior to display the visible data points, use any one of the properties');