Closed geoerika closed 2 years ago
fixed by taking zeroVarianceColumns
into consideration when computing renderableValueKeys
:
renderableValueKeys: computed(
[
(state) => state.valueKeys,
(state) => state.mapValueKeys,
(state) => state.group,
(state) => state.type,
(state) => state.zeroVarianceColumns,
],
(
valueKeys,
mapValueKeys,
group,
type,
zeroVarianceColumns,
) => (
type === 'map'
? mapValueKeys.filter(({ key, agg }) => key && (agg || zeroVarianceColumns.includes(key)))
: valueKeys.filter(({ key, agg }) => key && (agg || zeroVarianceColumns.includes(key) || !group))
)
),
Perhaps you can add this to #55
Did you test this? Because zeroVarianceColumns
is not calculated until you use the useTransformedData
which is called fromWidgetAdapter
, soisReady
won't be set true
in WidgetView
, which calls WidgetAdapter
. I believe the fix is more complex than this. I was thinking that the only way to do it would be to call useTransformData
earlier (in WidgetView
) and pass the data down to WidgetAdapter
. I tested your solution myself and it didn't work
Hmmm, that's very strange, I did test it and just double-checked, and it is working on my machine...
Let me know, I can still try to include the ideas I listed here into my PR, np. I just wanted to know if you agree with it.
Ok, let me try again
Ok, just tested again, you are right, it is working. Don't know what happened when I tried it first. All good, will include this in #55.
@vxsl done!
:ok_hand:
Problem:
key
column is a zero variance one and we select thekey
value first, theagg
becomesN/A
and cannot be selected, resulting inisReady
beingfalse
and no chart or map is displayed.Recording: https://user-images.githubusercontent.com/41120953/148788762-0c55e1cc-8efb-4032-9728-2c990d6bb68a.mov