implydata / pivot

An interactive data exploration UI for Druid

Home Page:https://docs.imply.io/latest/pivot-overview/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exclude Filters Are Ignored in Pinboard

alodium opened this issue · comments

commented

Hi.

From the code it looks like it is meant to be like that, but I hope that it is a bug, or for explanation why:

Having the same dimension in the filter AND split menu:

When I exclude the above dimension in the filter dropdown list in chart mode, I get a chart of all the -not-what-I-selected values.
In the pinboard, I keep getting the selected values, that should be excluded. See screenshot.

In the code I see that we are setting include, hardcoded, never mind what is the filter mode.
client/components/dimension-tile/dimension-tile.tsx:107
filter.setExclusionforDimension(false, dimension);

And then again in line 243:
this.setState({filterMode: Filter.INCLUDED}); - if this has colors, which it does, because it is a split.

The code is also not ready for the exclude in the pinboard because, in line 434, we remove from the list all the values that are not selected, but if the filter would work, we would get exactly the values that are not in the list, causing the pinboard to be empty.
rowData = rowData.filter((d) => filterSet.contains(d[dimension.name]));

Commenting up 1 and 2 and adding if (filterSet && !excluded) { to three, fix the problem.
My question is, why is it there, and what will I break by doing so?

Hope you find a better solution (or explain),

Thanks,
Lior.
exclude