[TSVB] Stacked series should not contain null values (#14923)

This commit is contained in:
Chris Cowan 2017-11-27 11:20:37 -07:00 committed by GitHub
parent 0e7c426867
commit 0d92568229
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,6 +59,16 @@ function TimeseriesVisualization(props) {
.filter(r => _.startsWith(r.id, s.id))
.forEach(r => delete r.label);
}
if (s.stacked !== 'none') {
series
.filter(r => _.startsWith(r.id, s.id))
.forEach(row => {
row.data = row.data.map(point => {
if (!point[1]) return [point[0], 0];
return point;
});
});
}
if (s.stacked === 'percent') {
s.seperate_axis = true;
s.axisFormatter = 'percent';