pivot icon indicating copy to clipboard operation
pivot copied to clipboard

Exclude Filters Are Ignored in Pinboard

Open alodium opened this issue 8 years ago • 0 comments

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

alodium avatar Aug 03 '16 07:08 alodium