OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <link rel="import" href="../lib/net.html"> | 7 <link rel="import" href="../lib/net.html"> |
8 | 8 |
9 <script> | 9 <script> |
10 function JSONGraphData(url) { | 10 function JSONGraphData(url) { |
(...skipping 10 matching lines...) Expand all Loading... |
21 return net.json({url: this._url}).then(function(data) { | 21 return net.json({url: this._url}).then(function(data) { |
22 // Convert timestamps to Date objects. | 22 // Convert timestamps to Date objects. |
23 data.rows.forEach(function(row) { | 23 data.rows.forEach(function(row) { |
24 row[0] = new Date(row[0] * 1000); | 24 row[0] = new Date(row[0] * 1000); |
25 }); | 25 }); |
26 self._formattedDataCache = data; | 26 self._formattedDataCache = data; |
27 return data; | 27 return data; |
28 }); | 28 }); |
29 }; | 29 }; |
30 </script> | 30 </script> |
OLD | NEW |