Skip to content

Commit

Permalink
fix: missing nan value in timeseries chart (apache#1231)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Nov 26, 2021
1 parent 0433df8 commit db6b76a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ export default function buildQuery(formData: QueryFormData) {
options: {
index: ['__timestamp'],
columns: formData.groupby || [],
// Create 'dummy' sum aggregates to assign cell values in pivot table
// Create 'dummy' mean aggregates to assign cell values in pivot table
// use the 'mean' aggregates to avoid drop NaN
aggregates: Object.fromEntries(
metricLabels.map(metric => [metric, { operator: 'sum' }]),
metricLabels.map(metric => [metric, { operator: 'mean' }]),
),
drop_missing_columns: false,
},
},
formData.contributionMode
Expand Down

0 comments on commit db6b76a

Please sign in to comment.