createCommonChart method

  1. @override
BaseChart<String> createCommonChart(
  1. BaseChartState<String> chartState
)
override

Creates and returns a common.BaseChart.

Subclasses should override this method to create and configure the appropriate common.BaseChart instance.

Implementation

@override
common.BaseChart<String> createCommonChart(
  BaseChartState<String> chartState,
) =>
    // Optionally create primary and secondary measure axes if the chart was
    // configured with them. If no axes were configured, then the chart will
    // use its default types (usually a numeric axis).
    common.BarChart(
      vertical: vertical,
      layoutConfig: layoutConfig?.commonLayoutConfig,
      primaryMeasureAxis: primaryMeasureAxis?.createAxis(),
      secondaryMeasureAxis: secondaryMeasureAxis?.createAxis(),
      disjointMeasureAxes: createDisjointMeasureAxes(),
    );