BarChart constructor

BarChart(
  1. List<Series<dynamic, String>> seriesList, {
  2. Key? key,
  3. bool? animate,
  4. Duration? animationDuration,
  5. AxisSpec? domainAxis,
  6. NumericAxisSpec? primaryMeasureAxis,
  7. NumericAxisSpec? secondaryMeasureAxis,
  8. LinkedHashMap<String, NumericAxisSpec>? disjointMeasureAxes,
  9. BarGroupingType? barGroupingType,
  10. BarRendererConfig<String>? defaultRenderer,
  11. List<SeriesRendererConfig<String>>? customSeriesRenderers,
  12. List<ChartBehavior<String>>? behaviors,
  13. List<SelectionModelConfig<String>>? selectionModels,
  14. RTLSpec? rtlSpec,
  15. bool vertical = true,
  16. bool defaultInteractions = true,
  17. LayoutConfig? layoutConfig,
  18. UserManagedState<String>? userManagedState,
  19. BarRendererDecorator<String>? barRendererDecorator,
  20. bool? flipVerticalAxis,
})

Creates a bar chart with the given series of data.

seriesList The list of series to be plotted on the chart. animate Whether to animate the chart when data changes. animationDuration The duration of the animation when data changes. domainAxis The domain axis to use for the chart. If not provided, a default axis will be used. primaryMeasureAxis The primary measure axis to use for the chart. If not provided, a default numeric axis will be used. secondaryMeasureAxis The secondary measure axis to use for the chart, if needed. disjointMeasureAxes A map of measure axes for disjoint domains, if needed. barGroupingType The type of grouping to use for multiple series. defaultRenderer The default renderer to use for the series. If not provided, a default BarRendererConfig will be used. customSeriesRenderers Custom renderers for specific series, if needed. behaviors A list of chart behaviors to attach to the chart. selectionModels A list of selection models to attach to the chart. rtlSpec Configures the chart for right-to-left languages. vertical Whether to render the bars vertically (true) or horizontally (false). defaultInteractions Whether to add the default interactions to the chart. layoutConfig Configuration for chart layout. userManagedState Allows external management of chart state. barRendererDecorator A decorator for the bar renderer. flipVerticalAxis Whether to flip the vertical axis of the chart.

Implementation

BarChart(
  super.seriesList, {
  super.key,
  super.animate,
  super.animationDuration,
  super.domainAxis,
  super.primaryMeasureAxis,
  super.secondaryMeasureAxis,
  super.disjointMeasureAxes,
  common.BarGroupingType? barGroupingType,
  common.BarRendererConfig<String>? defaultRenderer,
  super.customSeriesRenderers,
  super.behaviors,
  super.selectionModels,
  super.rtlSpec,
  this.vertical = true,
  super.defaultInteractions,
  super.layoutConfig,
  super.userManagedState,
  this.barRendererDecorator,
  super.flipVerticalAxis,
}) : super(
        defaultRenderer: defaultRenderer ??
            common.BarRendererConfig<String>(
              groupingType: barGroupingType,
              barRendererDecorator: barRendererDecorator,
            ),
      );