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

Side by Side Diff: tracing/tracing/value/ui/histogram_span.html

Issue 2994183002: Results.html: fix height of statistics table. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | tracing/tracing/value/ui/histogram_span_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 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/math/statistics.html"> 8 <link rel="import" href="/tracing/base/math/statistics.html">
9 <link rel="import" href="/tracing/base/timing.html"> 9 <link rel="import" href="/tracing/base/timing.html">
10 <link rel="import" href="/tracing/ui/base/box_chart.html"> 10 <link rel="import" href="/tracing/ui/base/box_chart.html">
(...skipping 16 matching lines...) Expand all
27 #chart { 27 #chart {
28 flex-grow: 1; 28 flex-grow: 1;
29 display: none; 29 display: none;
30 } 30 }
31 #drag_handle, #diagnostics_tab_templates { 31 #drag_handle, #diagnostics_tab_templates {
32 display: none; 32 display: none;
33 } 33 }
34 #chart svg { 34 #chart svg {
35 display: block; 35 display: block;
36 } 36 }
37 #stats_container {
38 overflow-y: auto;
39 }
37 </style> 40 </style>
38 41
39 <div id="container"> 42 <div id="container">
40 <div id="chart"></div> 43 <div id="chart"></div>
41 <div id="stats_container"> 44 <div id="stats_container">
42 <tr-v-ui-scalar-map-table id="stats"></tr-v-ui-scalar-map-table> 45 <tr-v-ui-scalar-map-table id="stats"></tr-v-ui-scalar-map-table>
43 </div> 46 </div>
44 </div> 47 </div>
45 <tr-ui-b-drag-handle id="drag_handle"></tr-ui-b-drag-handle> 48 <tr-ui-b-drag-handle id="drag_handle"></tr-ui-b-drag-handle>
46 49
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 190
188 onResize_(event) { 191 onResize_(event) {
189 event.stopPropagation(); 192 event.stopPropagation();
190 let heightPx = parseInt(this.$.container.style.height); 193 let heightPx = parseInt(this.$.container.style.height);
191 if (heightPx < this.defaultGraphHeight) { 194 if (heightPx < this.defaultGraphHeight) {
192 heightPx = this.defaultGraphHeight; 195 heightPx = this.defaultGraphHeight;
193 this.$.container.style.height = this.defaultGraphHeight + 'px'; 196 this.$.container.style.height = this.defaultGraphHeight + 'px';
194 } 197 }
195 this.chart_.graphHeight = heightPx - (this.chart_.margin.top + 198 this.chart_.graphHeight = heightPx - (this.chart_.margin.top +
196 this.chart_.margin.bottom); 199 this.chart_.margin.bottom);
200 this.$.stats_container.style.maxHeight =
201 this.chart_.getBoundingClientRect().height + 'px';
197 }, 202 },
198 203
199 /** 204 /**
200 * Get the width in pixels of the widest bar in the bar chart, not the total 205 * Get the width in pixels of the widest bar in the bar chart, not the total
201 * bar chart svg tag, which includes margins containing axes and legend. 206 * bar chart svg tag, which includes margins containing axes and legend.
202 * 207 *
203 * @return {number} 208 * @return {number}
204 */ 209 */
205 get graphWidth() { 210 get graphWidth() {
206 return this.graphWidth_ || this.defaultGraphWidth; 211 return this.graphWidth_ || this.defaultGraphWidth;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 x: '', 520 x: '',
516 color: 'blue', 521 color: 'blue',
517 percentile_0: this.histogram.running.min, 522 percentile_0: this.histogram.running.min,
518 percentile_25: this.histogram.getApproximatePercentile(0.25), 523 percentile_25: this.histogram.getApproximatePercentile(0.25),
519 percentile_50: this.histogram.getApproximatePercentile(0.5), 524 percentile_50: this.histogram.getApproximatePercentile(0.5),
520 percentile_75: this.histogram.getApproximatePercentile(0.75), 525 percentile_75: this.histogram.getApproximatePercentile(0.75),
521 percentile_100: this.histogram.running.max, 526 percentile_100: this.histogram.running.max,
522 } 527 }
523 ]; 528 ];
524 } 529 }
530 this.$.stats_container.style.maxHeight =
531 this.chart_.getBoundingClientRect().height + 'px';
525 await this.viewState.update({ 532 await this.viewState.update({
526 brushedBinRange: tr.b.math.Range.fromExplicitRange( 533 brushedBinRange: tr.b.math.Range.fromExplicitRange(
527 0, this.histogram.allBins.length)}); 534 0, this.histogram.allBins.length)});
528 return; 535 return;
529 } 536 }
530 537
531 this.chart_ = new tr.ui.b.NameBarChart(); 538 this.chart_ = new tr.ui.b.NameBarChart();
532 Polymer.dom(this.$.chart).appendChild(this.chart_); 539 Polymer.dom(this.$.chart).appendChild(this.chart_);
533 this.chart_.graphWidth = this.graphWidth; 540 this.chart_.graphWidth = this.graphWidth;
534 this.chart_.graphHeight = this.graphHeight; 541 this.chart_.graphHeight = this.graphHeight;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 const dataRange = tr.b.math.Range.fromExplicitRange(0, binCounts[0]); 574 const dataRange = tr.b.math.Range.fromExplicitRange(0, binCounts[0]);
568 if (binCounts[1] > 0 && binCounts[0] > (binCounts[1] * 2)) { 575 if (binCounts[1] > 0 && binCounts[0] > (binCounts[1] * 2)) {
569 dataRange.max = binCounts[1] * (1 + TRUNCATE_BIN_MARGIN); 576 dataRange.max = binCounts[1] * (1 + TRUNCATE_BIN_MARGIN);
570 } 577 }
571 if (binCounts[2] > 0 && binCounts[1] > (binCounts[2] * 2)) { 578 if (binCounts[2] > 0 && binCounts[1] > (binCounts[2] * 2)) {
572 dataRange.max = binCounts[2] * (1 + TRUNCATE_BIN_MARGIN); 579 dataRange.max = binCounts[2] * (1 + TRUNCATE_BIN_MARGIN);
573 } 580 }
574 this.chart_.overrideDataRange = dataRange; 581 this.chart_.overrideDataRange = dataRange;
575 582
576 this.chart_.data = chartData; 583 this.chart_.data = chartData;
584 this.$.stats_container.style.maxHeight =
585 this.chart_.getBoundingClientRect().height + 'px';
577 } 586 }
578 }); 587 });
579 }); 588 });
580 </script> 589 </script>
OLDNEW
« no previous file with comments | « no previous file | tracing/tracing/value/ui/histogram_span_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698