Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: tracing/tracing/ui/base/name_bar_chart.html

Issue 1967613003: Migrate child element manipulation, innerHTML, classList, attributes, (Closed) Base URL: https://github.com/catapult-project/catapult.git@polymer10-migration
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/range.html"> 8 <link rel="import" href="/tracing/base/range.html">
9 <link rel="import" href="/tracing/ui/base/bar_chart.html">
9 <link rel="import" href="/tracing/ui/base/d3.html"> 10 <link rel="import" href="/tracing/ui/base/d3.html">
10 <link rel="import" href="/tracing/ui/base/bar_chart.html">
11 11
12 <script> 12 <script>
13 'use strict'; 13 'use strict';
14 14
15 tr.exportTo('tr.ui.b', function() { 15 tr.exportTo('tr.ui.b', function() {
16 var BarChart = tr.ui.b.BarChart; 16 var BarChart = tr.ui.b.BarChart;
17 17
18 // @constructor 18 // @constructor
19 var NameBarChart = tr.ui.b.define('name-bar-chart', BarChart); 19 var NameBarChart = tr.ui.b.define('name-bar-chart', BarChart);
20 20
21 NameBarChart.prototype = { 21 NameBarChart.prototype = {
22 __proto__: BarChart.prototype, 22 __proto__: BarChart.prototype,
23 23
24 decorate: function() { 24 decorate: function() {
25 BarChart.prototype.decorate.call(this); 25 BarChart.prototype.decorate.call(this);
26 this.classList.remove('bar-chart'); 26 Polymer.dom(this).classList.remove('bar-chart');
27 this.classList.add('name-bar-chart'); 27 Polymer.dom(this).classList.add('name-bar-chart');
28 this.bottomMargin_ = 40; 28 this.bottomMargin_ = 40;
29 }, 29 },
30 30
31 isDatumFieldSeries_: function(fieldName) { 31 isDatumFieldSeries_: function(fieldName) {
32 return fieldName != 'x'; 32 return fieldName != 'x';
33 }, 33 },
34 34
35 getXForDatum_: function(datum, index) { 35 getXForDatum_: function(datum, index) {
36 return index; 36 return index;
37 }, 37 },
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 }.bind(this)); 87 }.bind(this));
88 } 88 }
89 }; 89 };
90 90
91 return { 91 return {
92 NameBarChart: NameBarChart 92 NameBarChart: NameBarChart
93 }; 93 };
94 }); 94 });
95 </script> 95 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698