| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/base/color_scheme.html"> | 8 <link rel="import" href="/tracing/base/color_scheme.html"> |
| 9 <link rel="import" href="/tracing/ui/analysis/analysis_link.html"> | 9 <link rel="import" href="/tracing/ui/analysis/analysis_link.html"> |
| 10 <link rel="import" href="/tracing/ui/base/d3.html"> | 10 <link rel="import" href="/tracing/ui/base/d3.html"> |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 ChartBase.prototype = { | 223 ChartBase.prototype = { |
| 224 __proto__: HTMLUnknownElement.prototype, | 224 __proto__: HTMLUnknownElement.prototype, |
| 225 | 225 |
| 226 getDataSeries: function(key) { | 226 getDataSeries: function(key) { |
| 227 if (!this.seriesByKey_.has(key)) | 227 if (!this.seriesByKey_.has(key)) |
| 228 this.seriesByKey_.set(key, new DataSeries(key)); | 228 this.seriesByKey_.set(key, new DataSeries(key)); |
| 229 return this.seriesByKey_.get(key); | 229 return this.seriesByKey_.get(key); |
| 230 }, | 230 }, |
| 231 | 231 |
| 232 getDataSeries: function(key) { | |
| 233 if (!this.seriesByKey_.has(key)) | |
| 234 this.seriesByKey_.set(key, new DataSeries(key)); | |
| 235 return this.seriesByKey_.get(key); | |
| 236 }, | |
| 237 | |
| 238 decorate: function() { | 232 decorate: function() { |
| 239 Polymer.dom(this).classList.add('chart-base'); | 233 Polymer.dom(this).classList.add('chart-base'); |
| 240 this.chartTitle_ = undefined; | 234 this.chartTitle_ = undefined; |
| 241 this.seriesByKey_ = new Map(); | 235 this.seriesByKey_ = new Map(); |
| 242 this.width_ = 400; | 236 this.width_ = 400; |
| 243 this.height_ = 300; | 237 this.height_ = 300; |
| 244 this.margin = {top: 20, right: 72, bottom: 30, left: 50}; | 238 this.margin = {top: 20, right: 72, bottom: 30, left: 50}; |
| 245 this.hideLegend_ = false; | 239 this.hideLegend_ = false; |
| 246 | 240 |
| 247 // This should use tr.ui.b.instantiateTemplate. However, creating | 241 // This should use tr.ui.b.instantiateTemplate. However, creating |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 } | 493 } |
| 500 }; | 494 }; |
| 501 | 495 |
| 502 return { | 496 return { |
| 503 DataSeriesEnableChangeEventType: DataSeriesEnableChangeEventType, | 497 DataSeriesEnableChangeEventType: DataSeriesEnableChangeEventType, |
| 504 getColorOfKey: getColorOfKey, | 498 getColorOfKey: getColorOfKey, |
| 505 ChartBase: ChartBase | 499 ChartBase: ChartBase |
| 506 }; | 500 }; |
| 507 }); | 501 }); |
| 508 </script> | 502 </script> |
| OLD | NEW |