datasweet / kibana-datasweet-formula

This Kibana plugin allows calculated metrics on any standard kibana visualizations.
Apache License 2.0
121 stars 34 forks source link

Hierarchical vis support (metrics for every bucket/level) #24

Closed gmatheus closed 6 years ago

gmatheus commented 6 years ago

Guys, another fix for datasweet-formula in Table visualization:

When creating a table split by some kind of bucket, adding a formula metric and selecting Calculate metrics for every bucket/level in options, Kibana shows this error: image

To fix this, I created a AggConfigs.toDsl decorator that removes undefinedvalues from dsl object and also added a columnGroup config in the response. This is the final result: image

The column group config is needed in order to calculate the formulas separately!

This fix was tested in 6.1.1 version only. If you have any suggestion or change requests, please let me know!

charlotth commented 6 years ago

HI @gmatheus Sry for the late answer, i am actually on vacations. i will take a look to your PR. Thx =)