configureDomainAxes method

  1. @override
void configureDomainAxes(
  1. List<MutableSeries<D>> seriesList
)
inherited

Adds the domain values for the given series to the chart's domain axis.

Implementation

@override
void configureDomainAxes(List<MutableSeries<D>> seriesList) {
  super.configureDomainAxes(seriesList);

  // Configure the domain axis to use a range band configuration.
  if (seriesList.isNotEmpty) {
    // Given that charts can only have one domain axis, just grab it from the
    // first series.
    final domainAxis = seriesList.first.getAttr(domainAxisKey)!;
    // rangeBandConfig is set when current config is not valid to render
    // bars (this is necessary with combo charts that have NumericAxis)
    if (!domainAxis.hasValidBarChartRangeBandConfig) {
      domainAxis.setRangeBandConfig(RangeBandConfig.styleAssignedPercent());
    }
  }
}