| 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/base/color_scheme.html"> | 8 <link rel="import" href="/tracing/base/color_scheme.html"> |
| 9 <link rel="import" href="/tracing/ui/analysis/analysis_link.html"> | 9 <link rel="import" href="/tracing/ui/analysis/analysis_link.html"> |
| 10 <link rel="import" href="/tracing/ui/base/d3.html"> | 10 <link rel="import" href="/tracing/ui/base/d3.html"> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 textNode.setAttributeNS(null, 'y', 0); | 43 textNode.setAttributeNS(null, 'y', 0); |
| 44 textNode.setAttributeNS(null, 'fill', 'black'); | 44 textNode.setAttributeNS(null, 'fill', 'black'); |
| 45 textNode.appendChild(document.createTextNode(text)); | 45 textNode.appendChild(document.createTextNode(text)); |
| 46 parentNode.appendChild(textNode); | 46 parentNode.appendChild(textNode); |
| 47 var widthPx = textNode.getComputedTextLength(); | 47 var widthPx = textNode.getComputedTextLength(); |
| 48 parentNode.removeChild(textNode); | 48 parentNode.removeChild(textNode); |
| 49 return widthPx; | 49 return widthPx; |
| 50 } | 50 } |
| 51 | 51 |
| 52 return { | 52 return { |
| 53 getSVGTextWidth: getSVGTextWidth | 53 getSVGTextWidth, |
| 54 }; | 54 }; |
| 55 }); | 55 }); |
| 56 | 56 |
| 57 Polymer({ | 57 Polymer({ |
| 58 is: 'tr-ui-b-chart-legend-key', | 58 is: 'tr-ui-b-chart-legend-key', |
| 59 | 59 |
| 60 ready: function() { | 60 ready: function() { |
| 61 this.$.checkbox.addEventListener( | 61 this.$.checkbox.addEventListener( |
| 62 'change', this.onCheckboxChange_.bind(this)); | 62 'change', this.onCheckboxChange_.bind(this)); |
| 63 }, | 63 }, |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 this.style.fontWeight = 'bold'; | 487 this.style.fontWeight = 'bold'; |
| 488 } else { | 488 } else { |
| 489 this.style.fill = dataSeries.color; | 489 this.style.fill = dataSeries.color; |
| 490 this.style.fontWeight = ''; | 490 this.style.fontWeight = ''; |
| 491 } | 491 } |
| 492 }); | 492 }); |
| 493 } | 493 } |
| 494 }; | 494 }; |
| 495 | 495 |
| 496 return { | 496 return { |
| 497 DataSeriesEnableChangeEventType: DataSeriesEnableChangeEventType, | 497 DataSeriesEnableChangeEventType, |
| 498 getColorOfKey: getColorOfKey, | 498 getColorOfKey, |
| 499 ChartBase: ChartBase | 499 ChartBase, |
| 500 }; | 500 }; |
| 501 }); | 501 }); |
| 502 </script> | 502 </script> |
| OLD | NEW |