OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 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 <polymer-element name="base-chart" attributes="chartTitle units flotData"> | 8 <dom-module id="base-chart" attributes="chartTitle units flotData"> |
dtu
2016/04/27 17:34:25
Change these to properties.
| |
9 <script> | 9 <script> |
10 'use strict'; | 10 'use strict'; |
11 Polymer('base-chart', { | 11 Polymer({ |
12 | |
13 is: 'base-chart', | |
14 properties: { | |
15 | |
16 }, | |
17 | |
12 getChartOptions: function() { | 18 getChartOptions: function() { |
13 return {}; | 19 return {}; |
14 }, | 20 }, |
15 | 21 |
16 /** | 22 /** |
17 * Initializes the summary-chart element and its properties. | 23 * Initializes the summary-chart element and its properties. |
18 * This is a custom element lifecycle callback that's called when an | 24 * This is a custom element lifecycle callback that's called when an |
19 * instance of the element is "ready". | 25 * instance of the element is "ready". |
20 */ | 26 */ |
21 ready: function() { | 27 ready: function() { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 * Resizes the chart if it's present. | 89 * Resizes the chart if it's present. |
84 */ | 90 */ |
85 resizeGraph: function() { | 91 resizeGraph: function() { |
86 if (!this.chart) { | 92 if (!this.chart) { |
87 return; | 93 return; |
88 } | 94 } |
89 this.updateChart(); | 95 this.updateChart(); |
90 } | 96 } |
91 }); | 97 }); |
92 </script> | 98 </script> |
93 </polymer-element> | 99 </polymer-element> |
dtu
2016/04/27 17:34:25
This one too.
| |
OLD | NEW |