Skip to content

Commit 96796d6

Browse files
authored
Linked Time: Fix histogram range selection bug (#6048)
Fix bug with histogram end fob not being shown due t #6033
1 parent dcfc0a7 commit 96796d6

File tree

6 files changed

+10
-0
lines changed

6 files changed

+10
-0
lines changed

tensorboard/webapp/metrics/views/card_renderer/histogram_card_component.ng.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
[timeProperty]="timeProperty(xAxisType)"
6666
[color]="runColorScale(runId)"
6767
[timeSelection]="convertToTimeSelection(linkedTimeSelection)"
68+
[rangeSelectionEnabled]="rangeSelectionEnabled"
6869
(onLinkedTimeSelectionChanged)="onLinkedTimeSelectionChanged.emit($event)"
6970
(onLinkedTimeToggled)="onLinkedTimeToggled.emit()"
7071
></tb-histogram>

tensorboard/webapp/metrics/views/card_renderer/histogram_card_component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export class HistogramCardComponent {
5050
@Input() showFullSize!: boolean;
5151
@Input() isPinned!: boolean;
5252
@Input() linkedTimeSelection!: TimeSelectionView | null;
53+
@Input() rangeSelectionEnabled?: boolean;
5354
@Input() isClosestStepHighlighted!: boolean | null;
5455

5556
@Output() onFullSizeToggle = new EventEmitter<void>();

tensorboard/webapp/metrics/views/card_renderer/histogram_card_container.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {
4141
getCardTimeSeries,
4242
getMetricsHistogramMode,
4343
getMetricsLinkedTimeSelection,
44+
getMetricsRangeSelectionEnabled,
4445
getMetricsXAxisType,
4546
} from '../../store';
4647
import {CardId, CardMetadata} from '../../types';
@@ -73,6 +74,7 @@ type HistogramCardMetadata = CardMetadata & {
7374
[isPinned]="isPinned$ | async"
7475
[isClosestStepHighlighted]="isClosestStepHighlighted$ | async"
7576
[linkedTimeSelection]="linkedTimeSelection$ | async"
77+
[rangeSelectionEnabled]="rangeSelectionEnabled$ | async"
7678
(onFullSizeToggle)="onFullSizeToggle()"
7779
(onPinClicked)="pinStateChanged.emit($event)"
7880
(onLinkedTimeSelectionChanged)="onLinkedTimeSelectionChanged($event)"
@@ -106,6 +108,7 @@ export class HistogramCardContainer implements CardRenderer, OnInit {
106108
data$?: Observable<HistogramDatum[]>;
107109
mode$ = this.store.select(getMetricsHistogramMode);
108110
xAxisType$ = this.store.select(getMetricsXAxisType);
111+
rangeSelectionEnabled$ = this.store.select(getMetricsRangeSelectionEnabled);
109112
showFullSize = false;
110113
isPinned$?: Observable<boolean>;
111114
linkedTimeSelection$?: Observable<TimeSelectionView | null>;

tensorboard/webapp/widgets/histogram/histogram_card_fob_controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {TemporalScale} from './histogram_component';
3030
<card-fob-controller
3131
[axisDirection]="axisDirection"
3232
[timeSelection]="timeSelection"
33+
[rangeSelectionEnabled]="rangeSelectionEnabled"
3334
[startStepAxisPosition]="getAxisPositionFromStartStep()"
3435
[endStepAxisPosition]="getAxisPositionFromEndStep()"
3536
[highestStep]="getHighestStep()"
@@ -44,6 +45,7 @@ import {TemporalScale} from './histogram_component';
4445
export class HistogramCardFobController {
4546
@Input() steps!: number[];
4647
@Input() timeSelection!: TimeSelection;
48+
@Input() rangeSelectionEnabled?: boolean;
4749
@Input() temporalScale!: TemporalScale;
4850
@Output() onTimeSelectionChanged = new EventEmitter<TimeSelection>();
4951
@Output() onTimeSelectionToggled = new EventEmitter();

tensorboard/webapp/widgets/histogram/histogram_component.ng.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<histogram-card-fob-controller
5555
class="histogram-card-fob"
5656
[timeSelection]="timeSelection"
57+
[rangeSelectionEnabled]="rangeSelectionEnabled"
5758
[steps]="getSteps()"
5859
[temporalScale]="scales.temporalScale"
5960
(onTimeSelectionChanged)="onLinkedTimeSelectionChanged.emit($event)"

tensorboard/webapp/widgets/histogram/histogram_component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export class HistogramComponent implements AfterViewInit, OnChanges, OnDestroy {
104104

105105
@Input() timeSelection: TimeSelection | null = null;
106106

107+
@Input() rangeSelectionEnabled: boolean = false;
108+
107109
@Output() onLinkedTimeSelectionChanged =
108110
new EventEmitter<TimeSelectionWithAffordance>();
109111
@Output() onLinkedTimeToggled = new EventEmitter();

0 commit comments

Comments
 (0)