allegro / turnilo

Business intelligence, data exploration and visualization web application for Druid, formerly known as Swiv and Pivot
https://allegro.github.io/turnilo/
Apache License 2.0
729 stars 171 forks source link

defaultSelectedMeasures does not set first 4 measures #1108

Closed jamangstangs closed 1 month ago

jamangstangs commented 2 months ago

https://github.com/allegro/turnilo/blob/1895141bfde2252bcd0db25b0754d601cc99d317/src/common/models/data-cube/data-cube.ts#L515-L521

In turnilo docs, defaultSelectedMeasures default value is first four measures. But, defaultSelectedMeasures is always initialized as an empty array, so the first4Measures section can never be called.

if (dataCube.defaultSelectedMeasures.length > 0) {
adrianmroz commented 1 month ago

Looks like you have fix ready, feel free to create a PR :)