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 = 0,
  22. double initialZoomFactor = 1,
  23. double initialZoomPosition = 0,
  24. InteractiveTooltip interactiveTooltip = const InteractiveTooltip(),
  25. double? minimum,
  26. double? maximum,
  27. double? interval,
  28. double? initialVisibleMinimum,
  29. double? initialVisibleMaximum,
  30. dynamic crossesAt,
  31. String? associatedAxisName,
  32. bool placeLabelsNearAxisLine = true,
  33. List<PlotBand> plotBands = const <PlotBand>[],
  34. int? desiredIntervals,
  35. RangeController? rangeController,
  36. double? maximumLabelWidth,
  37. double? labelsExtent,
  38. int? autoScrollingDelta,
  39. double borderWidth = 0.0,
  40. Color? borderColor,
  41. AxisBorderType axisBorderType = AxisBorderType.rectangle,
  42. MultiLevelLabelFormatterCallback? multiLevelLabelFormatter,
  43. MultiLevelLabelStyle multiLevelLabelStyle = const MultiLevelLabelStyle(),
  44. List<CategoricalMultiLevelLabel>? multiLevelLabels,
  45. AutoScrollingMode autoScrollingMode = AutoScrollingMode.end,
  46. ChartLabelFormatterCallback? axisLabelFormatter,
  47. 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.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');