| 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/ui/base/chart_base_2d_brushable_x.html"> | 8 <link rel="import" href="/tracing/ui/base/chart_base_2d_brushable_x.html"> |
| 9 | 9 |
| 10 <script> | 10 <script> |
| 11 'use strict'; | 11 'use strict'; |
| 12 | 12 |
| 13 tr.exportTo('tr.ui.b', function() { | 13 tr.exportTo('tr.ui.b', function() { |
| 14 var ColorScheme = tr.b.ColorScheme; | 14 var ColorScheme = tr.b.ColorScheme; |
| 15 var ChartBase2DBrushX = tr.ui.b.ChartBase2DBrushX; | 15 var ChartBase2DBrushX = tr.ui.b.ChartBase2DBrushX; |
| 16 var getColorOfKey = tr.ui.b.getColorOfKey; | 16 var getColorOfKey = tr.ui.b.getColorOfKey; |
| 17 | 17 |
| 18 // @constructor | 18 // @constructor |
| 19 var BarChart = tr.ui.b.define('bar-chart', ChartBase2DBrushX); | 19 var BarChart = tr.ui.b.define('bar-chart', ChartBase2DBrushX); |
| 20 | 20 |
| 21 BarChart.prototype = { | 21 BarChart.prototype = { |
| 22 __proto__: ChartBase2DBrushX.prototype, | 22 __proto__: ChartBase2DBrushX.prototype, |
| 23 | 23 |
| 24 decorate: function() { | 24 decorate: function() { |
| 25 ChartBase2DBrushX.prototype.decorate.call(this); | 25 ChartBase2DBrushX.prototype.decorate.call(this); |
| 26 this.classList.add('bar-chart'); | 26 Polymer.dom(this).classList.add('bar-chart'); |
| 27 this.xCushion_ = 0; | 27 this.xCushion_ = 0; |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 isDatumFieldSeries_: function(fieldName) { | 30 isDatumFieldSeries_: function(fieldName) { |
| 31 return fieldName != 'x'; | 31 return fieldName != 'x'; |
| 32 }, | 32 }, |
| 33 | 33 |
| 34 getXForDatum_: function(datum, index) { | 34 getXForDatum_: function(datum, index) { |
| 35 return datum.x; | 35 return datum.x; |
| 36 }, | 36 }, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 }, this); | 110 }, this); |
| 111 rectsSel.exit().remove(); | 111 rectsSel.exit().remove(); |
| 112 } | 112 } |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 return { | 115 return { |
| 116 BarChart: BarChart | 116 BarChart: BarChart |
| 117 }; | 117 }; |
| 118 }); | 118 }); |
| 119 </script> | 119 </script> |
| OLD | NEW |