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/base/d3.html"> | 9 <link rel="import" href="/tracing/ui/base/d3.html"> |
10 <link rel="import" href="/tracing/ui/base/ui.html"> | 10 <link rel="import" href="/tracing/ui/base/ui.html"> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 /** | 57 /** |
58 * A virtual base class for basic charts that provides X and Y axes, if | 58 * A virtual base class for basic charts that provides X and Y axes, if |
59 * needed, a title, and legend. | 59 * needed, a title, and legend. |
60 * | 60 * |
61 * @constructor | 61 * @constructor |
62 */ | 62 */ |
63 var ChartBase = tr.ui.b.define('svg', undefined, svgNS); | 63 var ChartBase = tr.ui.b.define('svg', undefined, svgNS); |
64 | 64 |
65 ChartBase.prototype = { | 65 ChartBase.prototype = { |
66 __proto__: HTMLUnknownElement.prototype, | 66 __proto__: HTMLDivElement.prototype, |
67 | 67 |
68 decorate: function() { | 68 decorate: function() { |
69 this.classList.add('chart-base'); | 69 this.classList.add('chart-base'); |
70 this.chartTitle_ = undefined; | 70 this.chartTitle_ = undefined; |
71 this.seriesKeys_ = undefined; | 71 this.seriesKeys_ = undefined; |
72 this.width_ = 400; | 72 this.width_ = 400; |
73 this.height_ = 300; | 73 this.height_ = 300; |
74 | 74 |
75 // This should use tr.ui.b.instantiateTemplate. However, creating | 75 // This should use tr.ui.b.instantiateTemplate. However, creating |
76 // svg-namespaced elements inside a template isn't possible. Thus, this | 76 // svg-namespaced elements inside a template isn't possible. Thus, this |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 }); | 268 }); |
269 } | 269 } |
270 }; | 270 }; |
271 | 271 |
272 return { | 272 return { |
273 getColorOfKey: getColorOfKey, | 273 getColorOfKey: getColorOfKey, |
274 ChartBase: ChartBase | 274 ChartBase: ChartBase |
275 }; | 275 }; |
276 }); | 276 }); |
277 </script> | 277 </script> |
OLD | NEW |