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

Side by Side Diff: appengine/swarming/elements/polymer05/stats-work-chart.html

Issue 2408743002: Move elements/ to ui/ (Closed)
Patch Set: rebase again Created 4 years, 2 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
(Empty)
1 <!--
2 # Copyright 2015 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file.
5
6 -->
7
8 <!--
9 @group Swarming Elements
10
11 `stats-work-chart' encapsulates a 'google-chart' element and data formating
12 logic specific for Shards Activity chart of the Swarming statistics app.
13 This element exposes a 'data' attribute which is a JSON serialized
14 `google.visualization.DataTable` object and a `resolution` attribute that is
15 'minutes', 'hours', or 'days'.
16
17 Example:
18 <stats-work-chart data="{{data_table}}"></stats-work-chart>
19
20 @element stats-work-chart
21 -->
22
23 <link rel="import" href="bower_components/polymer/polymer.html">
24 <link rel="import" href="stats-chart-base.html">
25
26 <polymer-element name="stats-work-chart" extends="stats-chart-base" attributes=" data resolution isDimension">
27 <script>
28 Polymer('stats-work-chart', {
29 isDimension: false,
30 titleText: 'Shards Activity',
31
32 populate: function() {
33 this.resetFormattedData();
34
35 // These indexes are relative to stats_gviz._Summary.ORDER.
36 this.getKeyFormatter().format(this.dataTable, 0);
37
38 var view = new google.visualization.DataView(this.dataTable);
39 if (this.isDimension) {
40 view.setColumns([0, 1, 2, 9, 10]);
41 } else {
42 view.setColumns([0, 3, 4, 11, 12]);
43 }
44
45 this.attachView(view);
46 }
47 });
48 </script>
49 </polymer-element>
OLDNEW
« no previous file with comments | « appengine/swarming/elements/polymer05/stats-time-chart.html ('k') | appengine/swarming/elements/res/imp/botlist/DESIGN.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698