Correcting some issues with the Time-Series Table (#8746)

* default timeLag to 0

* correct placeholder

* remove random link default
This commit is contained in:
David Aaron Suddjian 2019-12-04 10:32:33 -08:00 committed by Maxime Beauchemin
parent c88bb591eb
commit 0a5e4603c9
3 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ export default class TimeSeriesColumnControl extends React.Component {
colType: this.props.colType,
width: this.props.width,
height: this.props.height,
timeLag: this.props.timeLag,
timeLag: this.props.timeLag || 0,
timeRatio: this.props.timeRatio,
comparisonType: this.props.comparisonType,
showYAxis: this.props.showYAxis,
@ -223,7 +223,7 @@ export default class TimeSeriesColumnControl extends React.Component {
value={this.state.timeRatio}
onChange={this.onTextInputChange.bind(this, 'timeRatio')}
bsSize="small"
placeholder="Time Lag"
placeholder="Time Ratio"
/>,
)}
{this.state.colType === 'time' &&

View File

@ -1263,7 +1263,7 @@ export const controls = {
'The URL, this control is templated, so you can integrate ' +
'{{ width }} and/or {{ height }} in your URL string.',
),
default: 'https://www.youtube.com/embed/AdSZJzb-aX8',
default: '',
},
x_axis_label: {

View File

@ -168,7 +168,7 @@ class TimeTable extends React.PureComponent {
let errorMsg;
if (column.colType === 'time') {
// Time lag ratio
const { timeLag } = column;
const timeLag = column.timeLag || 0;
const totalLag = Object.keys(reversedEntries).length;
if (timeLag >= totalLag) {
errorMsg = `The time lag set at ${timeLag} is too large for the length of data at ${reversedEntries.length}. No data available.`;