| OLD | NEW | 
|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> | 
| 2 <!-- | 2 <!-- | 
| 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 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/ui/base/ui.html"> | 
| 8 <link rel="import" href="/tracing/ui/tracks/chart_axis.html"> | 9 <link rel="import" href="/tracing/ui/tracks/chart_axis.html"> | 
| 9 <link rel="import" href="/tracing/ui/tracks/chart_point.html"> | 10 <link rel="import" href="/tracing/ui/tracks/chart_point.html"> | 
| 10 <link rel="import" href="/tracing/ui/tracks/chart_series.html"> | 11 <link rel="import" href="/tracing/ui/tracks/chart_series.html"> | 
| 11 <link rel="import" href="/tracing/ui/tracks/chart_track.html"> | 12 <link rel="import" href="/tracing/ui/tracks/chart_track.html"> | 
| 12 <link rel="import" href="/tracing/ui/base/ui.html"> |  | 
| 13 | 13 | 
| 14 <script> | 14 <script> | 
| 15 'use strict'; | 15 'use strict'; | 
| 16 | 16 | 
| 17 tr.exportTo('tr.ui.tracks', function() { | 17 tr.exportTo('tr.ui.tracks', function() { | 
| 18 | 18 | 
| 19   /** | 19   /** | 
| 20    * A track that displays a Counter object. | 20    * A track that displays a Counter object. | 
| 21    * @constructor | 21    * @constructor | 
| 22    * @extends {ChartTrack} | 22    * @extends {ChartTrack} | 
| 23    */ | 23    */ | 
| 24   var CounterTrack = tr.ui.b.define('counter-track', tr.ui.tracks.ChartTrack); | 24   var CounterTrack = tr.ui.b.define('counter-track', tr.ui.tracks.ChartTrack); | 
| 25 | 25 | 
| 26   CounterTrack.prototype = { | 26   CounterTrack.prototype = { | 
| 27     __proto__: tr.ui.tracks.ChartTrack.prototype, | 27     __proto__: tr.ui.tracks.ChartTrack.prototype, | 
| 28 | 28 | 
| 29     decorate: function(viewport) { | 29     decorate: function(viewport) { | 
| 30       tr.ui.tracks.ChartTrack.prototype.decorate.call(this, viewport); | 30       tr.ui.tracks.ChartTrack.prototype.decorate.call(this, viewport); | 
| 31       this.classList.add('counter-track'); | 31       Polymer.dom(this).classList.add('counter-track'); | 
| 32     }, | 32     }, | 
| 33 | 33 | 
| 34     get counter() { | 34     get counter() { | 
| 35       return this.chart; | 35       return this.chart; | 
| 36     }, | 36     }, | 
| 37 | 37 | 
| 38     set counter(counter) { | 38     set counter(counter) { | 
| 39       this.heading = counter.name + ': '; | 39       this.heading = counter.name + ': '; | 
| 40       this.series = CounterTrack.buildChartSeriesFromCounter(counter); | 40       this.series = CounterTrack.buildChartSeriesFromCounter(counter); | 
| 41       this.autoSetAllAxes({expandMax: true}); | 41       this.autoSetAllAxes({expandMax: true}); | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
| 71     chartSeries.reverse(); | 71     chartSeries.reverse(); | 
| 72 | 72 | 
| 73     return chartSeries; | 73     return chartSeries; | 
| 74   }; | 74   }; | 
| 75 | 75 | 
| 76   return { | 76   return { | 
| 77     CounterTrack: CounterTrack | 77     CounterTrack: CounterTrack | 
| 78   }; | 78   }; | 
| 79 }); | 79 }); | 
| 80 </script> | 80 </script> | 
| OLD | NEW | 
|---|