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

Unified Diff: packages/charted/lib/charts/data_transformers/aggregation_item.dart

Issue 2213693002: Updated charted DEP to 0.4.X (Closed) Base URL: https://github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: packages/charted/lib/charts/data_transformers/aggregation_item.dart
diff --git a/packages/charted/lib/charts/data_transformers/aggregation_item.dart b/packages/charted/lib/charts/data_transformers/aggregation_item.dart
index 1c9f564991668f7a5c6f122c492d6ae5be303f0f..5ac5b56e464a0b5ad696e761b25c10a718515e85 100644
--- a/packages/charted/lib/charts/data_transformers/aggregation_item.dart
+++ b/packages/charted/lib/charts/data_transformers/aggregation_item.dart
@@ -28,6 +28,9 @@ abstract class AggregationItem extends ChangeNotifier {
/// are supported as the operators.
operator [](String key);
+ /// List of lower aggregations.
+ List<AggregationItem> lowerAggregations();
+
/// Check if we support a given key.
bool containsKey(String key);
@@ -132,13 +135,10 @@ class _AggregationItemImpl extends ChangeNotifier implements AggregationItem {
if (key == 'items') {
return new _AggregationItemsIterator(model, dimensions, _key);
}
- if (key == 'aggregations') {
- return _lowerAggregations();
- }
return null;
}
- List<AggregationItem> _lowerAggregations() {
+ List<AggregationItem> lowerAggregations() {
List<AggregationItem> aggregations = new List<AggregationItem>();
if (dimensions.length == model._dimFields.length) {
return aggregations;
@@ -148,7 +148,7 @@ class _AggregationItemImpl extends ChangeNotifier implements AggregationItem {
List lowerVals = model.valuesForDimension(lowerDimensionField);
lowerVals.forEach((name) {
- List lowerDims = new List.from(dimensions)..add(name);
+ List<String> lowerDims = new List.from(dimensions)..add(name);
AggregationItem entity = model.facts(lowerDims);
if (entity != null) {
aggregations.add(entity);

Powered by Google App Engine
This is Rietveld 408576698