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 = 0,
  20. MajorTickLines majorTickLines = const MajorTickLines(),
  21. MinorTickLines minorTickLines = const MinorTickLines(),
  22. MajorGridLines majorGridLines = const MajorGridLines(),
  23. MinorGridLines minorGridLines = const MinorGridLines(),
  24. TextStyle? labelStyle,
  25. DateFormat? dateFormat,
  26. DateTimeIntervalType intervalType = DateTimeIntervalType.auto,
  27. InteractiveTooltip interactiveTooltip = const InteractiveTooltip(),
  28. String? labelFormat,
  29. DateTime? minimum,
  30. DateTime? maximum,
  31. LabelAlignment labelAlignment = LabelAlignment.center,
  32. double? interval,
  33. DateTime? initialVisibleMinimum,
  34. DateTime? initialVisibleMaximum,
  35. dynamic crossesAt,
  36. String? associatedAxisName,
  37. bool placeLabelsNearAxisLine = true,
  38. List<PlotBand> plotBands = const <PlotBand>[],
  39. RangeController? rangeController,
  40. int? desiredIntervals,
  41. double? maximumLabelWidth,
  42. double? labelsExtent,
  43. DateTimeIntervalType autoScrollingDeltaType = DateTimeIntervalType.auto,
  44. int? autoScrollingDelta,
  45. double borderWidth = 0.0,
  46. Color? borderColor,
  47. AxisBorderType axisBorderType = AxisBorderType.rectangle,
  48. MultiLevelLabelStyle multiLevelLabelStyle = const MultiLevelLabelStyle(),
  49. MultiLevelLabelFormatterCallback? multiLevelLabelFormatter,
  50. List<DateTimeMultiLevelLabel>? multiLevelLabels,
  51. AutoScrollingMode autoScrollingMode = AutoScrollingMode.end,
  52. ChartLabelFormatterCallback? axisLabelFormatter,
  53. 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.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');