mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Fix a bug with the interval label for TSVB (#13440)
* Fix a bug with the interval label for TSVB * Ensure reduce returns something
This commit is contained in:
parent
511ffa22a5
commit
f89f89f0e6
1 changed files with 5 additions and 2 deletions
|
@ -80,8 +80,11 @@ function TimeseriesVisualization(props) {
|
|||
});
|
||||
|
||||
const interval = series.reduce((currentInterval, item) => {
|
||||
const seriesInterval = item.data[1][0] - item.data[0][0];
|
||||
if (!currentInterval || seriesInterval < currentInterval) return seriesInterval;
|
||||
if (item.data.length > 1) {
|
||||
const seriesInterval = item.data[1][0] - item.data[0][0];
|
||||
if (!currentInterval || seriesInterval < currentInterval) return seriesInterval;
|
||||
}
|
||||
return currentInterval;
|
||||
}, 0);
|
||||
|
||||
let axisCount = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue