Skip to content

Commit

Permalink
Added UserManagedState to Combo charts
Browse files Browse the repository at this point in the history
Combo charts did not include UserManagedState in constructor, which made it impossible to create e.g. a popup on the selected line datum.

•Added UserManagedState variable to be passed down into the super constructor on NumericComboChart and OrdinalComboChart
  • Loading branch information
FrenchTacoDev committed Oct 15, 2023
1 parent 85bd43b commit e81b7a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions community_charts_flutter/lib/src/combo_chart/combo_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import '../base_chart.dart' show LayoutConfig;
import '../base_chart_state.dart' show BaseChartState;
import '../cartesian_chart.dart' show CartesianChart;
import '../selection_model_config.dart' show SelectionModelConfig;
import '../user_managed_state.dart';

/// A numeric combo chart supports rendering each series of data with different
/// series renderers.
Expand All @@ -48,6 +49,7 @@ class NumericComboChart extends CartesianChart<num> {
List<SelectionModelConfig<num>>? selectionModels,
common.RTLSpec? rtlSpec,
LayoutConfig? layoutConfig,
UserManagedState<num>? userManagedState,
bool defaultInteractions = true,
}) : super(
seriesList,
Expand All @@ -62,6 +64,7 @@ class NumericComboChart extends CartesianChart<num> {
selectionModels: selectionModels,
rtlSpec: rtlSpec,
layoutConfig: layoutConfig,
userManagedState: userManagedState,
defaultInteractions: defaultInteractions,
);

Expand Down Expand Up @@ -93,6 +96,7 @@ class OrdinalComboChart extends CartesianChart<String> {
List<SelectionModelConfig<String>>? selectionModels,
common.RTLSpec? rtlSpec,
LayoutConfig? layoutConfig,
UserManagedState<String>? userManagedState,
bool defaultInteractions = true,
}) : super(
seriesList,
Expand All @@ -107,6 +111,7 @@ class OrdinalComboChart extends CartesianChart<String> {
selectionModels: selectionModels,
rtlSpec: rtlSpec,
layoutConfig: layoutConfig,
userManagedState: userManagedState,
defaultInteractions: defaultInteractions,
);

Expand Down

0 comments on commit e81b7a5

Please sign in to comment.