Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: packages/charted/lib/charts/src/chart_config_impl.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // 1 //
2 // Copyright 2014 Google Inc. All rights reserved. 2 // Copyright 2014 Google Inc. All rights reserved.
3 // 3 //
4 // Use of this source code is governed by a BSD-style 4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at 5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd 6 // https://developers.google.com/open-source/licenses/bsd
7 // 7 //
8 8
9 part of charted.charts; 9 part of charted.charts;
10 10
11 class DefaultChartConfigImpl extends ChangeNotifier implements ChartConfig { 11 class DefaultChartConfigImpl extends Observable implements ChartConfig {
12 final Map<String, ChartAxisConfig> _measureAxisRegistry = {}; 12 final Map<String, ChartAxisConfig> _measureAxisRegistry = {};
13 final Map<int, ChartAxisConfig> _dimensionAxisRegistry = {}; 13 final Map<int, ChartAxisConfig> _dimensionAxisRegistry = {};
14 final SubscriptionsDisposer _disposer = new SubscriptionsDisposer(); 14 final SubscriptionsDisposer _disposer = new SubscriptionsDisposer();
15 15
16 bool _isRTL = false; 16 bool _isRTL = false;
17 Iterable<ChartSeries> _series; 17 Iterable<ChartSeries> _series;
18 Iterable<int> _dimensions; 18 Iterable<int> _dimensions;
19 StreamSubscription _dimensionsSubscription; 19 StreamSubscription _dimensionsSubscription;
20 20
21 @override 21 @override
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 } 104 }
105 105
106 @override 106 @override
107 Iterable<int> get dimensions => _dimensions; 107 Iterable<int> get dimensions => _dimensions;
108 108
109 @override 109 @override
110 void registerMeasureAxis(String id, ChartAxisConfig config) { 110 void registerMeasureAxis(String id, ChartAxisConfig config) {
111 assert(config != null); 111 assert(config != null);
112 _measureAxisRegistry[id] = config; 112 _measureAxisRegistry[id] = config;
113 notifyChange(const ChartConfigChangeRecord());
113 } 114 }
114 115
115 @override 116 @override
116 ChartAxisConfig getMeasureAxis(String id) => _measureAxisRegistry[id]; 117 ChartAxisConfig getMeasureAxis(String id) => _measureAxisRegistry[id];
117 118
118 @override 119 @override
119 void registerDimensionAxis(int column, ChartAxisConfig config) { 120 void registerDimensionAxis(int column, ChartAxisConfig config) {
120 assert(config != null); 121 assert(config != null);
121 assert(dimensions.contains(column)); 122 assert(dimensions.contains(column));
122 _dimensionAxisRegistry[column] = config; 123 _dimensionAxisRegistry[column] = config;
124 notifyChange(const ChartConfigChangeRecord());
123 } 125 }
124 126
125 @override 127 @override
126 ChartAxisConfig getDimensionAxis(int column) => 128 ChartAxisConfig getDimensionAxis(int column) =>
127 _dimensionAxisRegistry[column]; 129 _dimensionAxisRegistry[column];
128 130
129 @override 131 @override
130 set isRTL(bool value) { 132 set isRTL(bool value) {
131 if (_isRTL != value && value != null) { 133 if (_isRTL != value && value != null) {
132 _isRTL = value; 134 _isRTL = value;
133 notifyChange(const ChartConfigChangeRecord()); 135 notifyChange(const ChartConfigChangeRecord());
134 } 136 }
135 } 137 }
136 138
137 @override 139 @override
138 bool get isRTL => _isRTL; 140 bool get isRTL => _isRTL;
139 } 141 }
OLDNEW
« no previous file with comments | « packages/charted/lib/charts/src/chart_axis_impl.dart ('k') | packages/charted/lib/charts/src/chart_data_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698