DateTimeAxis constructor

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

Creating an argument constructor of DateTimeAxis class.

Implementation

const DateTimeAxis({
  super.key,
  super.name,
  super.isVisible = true,
  super.title,
  super.axisLine,
  super.rangePadding,
  super.labelIntersectAction,
  super.labelPosition,
  super.tickPosition,
  super.edgeLabelPlacement,
  super.initialZoomFactor,
  super.initialZoomPosition,
  super.enableAutoIntervalOnZooming,
  super.labelRotation,
  super.isInversed,
  super.opposedPosition,
  super.minorTicksPerInterval,
  super.maximumLabels,
  super.plotOffset,
  super.plotOffsetStart,
  super.plotOffsetEnd,
  super.majorTickLines,
  super.minorTickLines,
  super.majorGridLines,
  super.minorGridLines,
  super.labelStyle,
  this.dateFormat,
  this.intervalType = DateTimeIntervalType.auto,
  super.interactiveTooltip,
  this.labelFormat,
  this.minimum,
  this.maximum,
  super.labelAlignment,
  super.interval,
  this.initialVisibleMinimum,
  this.initialVisibleMaximum,
  super.crossesAt,
  super.associatedAxisName,
  super.placeLabelsNearAxisLine,
  super.plotBands,
  super.rangeController,
  super.desiredIntervals,
  super.maximumLabelWidth,
  super.labelsExtent,
  this.autoScrollingDeltaType = DateTimeIntervalType.auto,
  super.autoScrollingDelta,
  super.borderWidth,
  super.borderColor,
  super.axisBorderType,
  super.multiLevelLabelStyle,
  super.multiLevelLabelFormatter,
  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');