Skip to content

Commit

Permalink
Correcting some issues with the Time-Series Table (apache#8746)
Browse files Browse the repository at this point in the history
* default timeLag to 0

* correct placeholder

* remove random link default
  • Loading branch information
suddjian authored and mistercrunch committed Dec 4, 2019
1 parent c88bb59 commit 0a5e460
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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' &&
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/visualizations/TimeTable/TimeTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.`;
Expand Down

0 comments on commit 0a5e460

Please sign in to comment.