Skip to content

Fix buttons for the scalars dashboard. #536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 33 additions & 23 deletions tensorboard/plugins/scalar/tf_scalar_dashboard/tf-scalar-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,27 @@
display-name="[[tagMetadata.displayName]]"
description="[[tagMetadata.description]]"
></tf-card-heading>
<tf-scalar-chart
x-type="[[xType]]"
x-components-creation-method="[[_xComponentsCreationMethod]]"
y-value-accessor="[[_yValueAccessor]]"
tooltip-columns="[[_tooltipColumns]]"
smoothing-enabled="[[smoothingEnabled]]"
smoothing-weight="[[smoothingWeight]]"
tooltip-sorting-method="[[tooltipSortingMethod]]"
ignore-y-outliers="[[ignoreYOutliers]]"
request-manager="[[requestManager]]"
runs="[[runs]]"
tag="[[tag]]"
tag-metadata="[[tagMetadata]]"
active="[[active]]"
data-url="[[_dataUrl]]"
log-scale-active="[[_logScaleActive]]"
process-data="[[_processData]]"
>
<div id="tf-scalar-chart-container">
<tf-scalar-chart
x-type="[[xType]]"
x-components-creation-method="[[_xComponentsCreationMethod]]"
y-value-accessor="[[_yValueAccessor]]"
tooltip-columns="[[_tooltipColumns]]"
smoothing-enabled="[[smoothingEnabled]]"
smoothing-weight="[[smoothingWeight]]"
tooltip-sorting-method="[[tooltipSortingMethod]]"
ignore-y-outliers="[[ignoreYOutliers]]"
request-manager="[[requestManager]]"
runs="[[runs]]"
tag="[[tag]]"
tag-metadata="[[tagMetadata]]"
active="[[active]]"
data-url="[[_dataUrl]]"
log-scale-active="[[_logScaleActive]]"
process-data="[[_processData]]"
>
</tf-scalar-chart>
</div>
<div id="buttons">
<paper-icon-button
selected$="[[_expanded]]"
Expand Down Expand Up @@ -96,21 +99,28 @@
</div>
</template>
</div>
</tf-scalar-chart>
<style>
:host {
height: 235px;
width: 330px;
margin: 5px;
display: block;
width: 330px;
}

:host[_expanded] {
width: 100%;
}

:host[_expanded] #tf-scalar-chart-container {
height: 400px;
}

#tf-scalar-chart-container {
height: 200px;
width: 100%;
}

tf-card-heading {
display: block;
margin-bottom: 10px;
}

Expand Down Expand Up @@ -158,7 +168,7 @@
import * as ChartHelpers from '../vz-line-chart/vz-chart-helpers.js';
import {getRouter} from '../tf-backend/router.js';

/**
/**
* Allows:
* - "step" - Linear scale using the "step" property of the datum.
* - "wall_time" - Temporal scale using the "wall_time" property of the
Expand Down Expand Up @@ -289,7 +299,7 @@
this.set('_logScaleActive', !this._logScaleActive);
},
_resetDomain() {
const chart = this.$$('vz-line-chart');
const chart = this.$$('tf-scalar-chart');
if (chart) {
chart.resetDomain();
}
Expand Down