mirror of https://github.com/apache/superset.git
Correcting some issues with the Time-Series Table (#8746)
* default timeLag to 0 * correct placeholder * remove random link default
This commit is contained in:
parent
c88bb591eb
commit
0a5e4603c9
|
@ -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' &&
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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.`;
|
||||
|
|
Loading…
Reference in New Issue