BucketingAxisSpec constructor

BucketingAxisSpec({
  1. RenderSpec<num>? renderSpec,
  2. NumericTickProviderSpec? tickProviderSpec,
  3. NumericTickFormatterSpec? tickFormatterSpec,
  4. bool? showAxisLine,
  5. bool? showBucket,
  6. num? threshold,
  7. NumericExtents? viewport,
})

Creates a NumericAxisSpec that is specialized for percentage data.

Implementation

BucketingAxisSpec({
  super.renderSpec,
  NumericTickProviderSpec? tickProviderSpec,
  NumericTickFormatterSpec? tickFormatterSpec,
  super.showAxisLine,
  bool? showBucket,
  this.threshold,
  NumericExtents? viewport,
})  : showBucket = showBucket ?? true,
      super(
        tickProviderSpec:
            tickProviderSpec ?? const BucketingNumericTickProviderSpec(),
        tickFormatterSpec: tickFormatterSpec ??
            BasicNumericTickFormatterSpec.fromNumberFormat(
              NumberFormat.percentPattern(),
            ),
        viewport: viewport ?? const NumericExtents(0.0, 1.0),
      );