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

Side by Side Diff: appengine/swarming/elements/stats/load-charts-api.html

Issue 2177353002: Add top level app element (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@hello-oauth
Patch Set: Address feedback and introduce new res/ layer of direction Created 4 years, 4 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 2016 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed by the Apache v2.0 license that can be
4 # found in the LICENSE file.
5 -->
6 <!--
7 This in an HTML Import-able file that contains the definition
8 of the following elements:
9
10 <load-charts-api>
11
12 It makes sure the Google Visualization api
13 (https://developers.google.com/chart/interactive/docs/) is loaded. This api
14 is also loaded by the google-chart element, but we need to make sure it is
15 loaded before we start partitioning the data, e.g. partial-data-chart.
16
17 Usage:
18
19 <load-charts-api></load-charts-api>
20
21 Properties:
22 loaded: Boolean, true if the charts api has been loaded.
23
24 Methods:
25 None.
26
27 Events:
28 None.
29 -->
30
31 <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></ script>
32 <link rel="import" href="../bower_components/google-apis/google-legacy-loader.ht ml">
33
34 <dom-module id="load-charts-api">
35 <template>
36
37 <google-legacy-loader on-api-load="_readyForAction"></google-legacy-loader>
38
39 </template>
40 <script>
41 Polymer({
42 is: 'load-charts-api',
43 properties: {
44 loaded: {
45 type: Boolean,
46 notify: true,
47 }
48 },
49
50 _readyForAction: function() {
51 google.load("visualization", "1", {
52 packages: {packages: ['corechart']},
53 callback: function() {
54 this.set("loaded", true);
55 }.bind(this)
56 });
57 }
58 });
59 </script>
60 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698