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

Unified Diff: tracing/tracing/value/ui/composition_span.html

Issue 2334233003: Merge NumericValue into Histogram (Closed)
Patch Set: fix rail_power_metric Created 4 years, 3 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
« no previous file with comments | « tracing/tracing/value/numeric.html ('k') | tracing/tracing/value/ui/composition_span_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/ui/composition_span.html
diff --git a/tracing/tracing/value/ui/composition_span.html b/tracing/tracing/value/ui/composition_span.html
index 825a2c623f8fe2de206257c07d6966479473e7d9..dcdb43488e664b9812edc98779b280ac8d45d9d9 100644
--- a/tracing/tracing/value/ui/composition_span.html
+++ b/tracing/tracing/value/ui/composition_span.html
@@ -86,14 +86,13 @@ Polymer({
dataSeries.color = color;
}
- if (value instanceof tr.v.NumericValue) {
+ if (value instanceof tr.v.Histogram) {
dataSeries.target = value;
- if (value.numeric instanceof tr.v.ScalarNumeric)
- data[name] = value.numeric.value;
- else if (value.numeric instanceof tr.v.Histogram)
- data[name] = value.numeric.sum;
+ data[name] = value.sum;
} else if (typeof value === 'number') {
data[name] = value;
+ } else {
+ throw new Error('unsupported value ' + value);
}
}
this.chart_.data = [data];
« no previous file with comments | « tracing/tracing/value/numeric.html ('k') | tracing/tracing/value/ui/composition_span_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698