OLD | NEW |
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 DefaultChartSeriesImpl extends ChangeNotifier implements ChartSeries { | 11 class DefaultChartSeriesImpl extends Observable implements ChartSeries { |
12 final String name; | 12 final String name; |
13 | 13 |
14 Iterable<String> _measureAxisIds; | 14 Iterable<String> _measureAxisIds; |
15 Iterable<int> _measures; | 15 Iterable<int> _measures; |
16 ChartRenderer _renderer; | 16 ChartRenderer _renderer; |
17 | 17 |
18 SubscriptionsDisposer _disposer = new SubscriptionsDisposer(); | 18 SubscriptionsDisposer _disposer = new SubscriptionsDisposer(); |
19 | 19 |
20 DefaultChartSeriesImpl(this.name, Iterable<int> measures, this._renderer, | 20 DefaultChartSeriesImpl(this.name, Iterable<int> measures, this._renderer, |
21 Iterable<String> measureAxisIds) { | 21 Iterable<String> measureAxisIds) { |
(...skipping 25 matching lines...) Expand all Loading... |
47 _measureAxisIds = value; | 47 _measureAxisIds = value; |
48 } | 48 } |
49 | 49 |
50 Iterable<String> get measureAxisIds => _measureAxisIds; | 50 Iterable<String> get measureAxisIds => _measureAxisIds; |
51 | 51 |
52 void _measuresChanged(List<ListChangeRecord> _) { | 52 void _measuresChanged(List<ListChangeRecord> _) { |
53 if (_measures is! ObservableList) return; | 53 if (_measures is! ObservableList) return; |
54 notifyChange(new ChartSeriesChangeRecord(this)); | 54 notifyChange(new ChartSeriesChangeRecord(this)); |
55 } | 55 } |
56 } | 56 } |
OLD | NEW |