Line Chart - How to filter for one single Term

Hi,

I have a dataset where files can belong to categories a and b that looks like follows:

{ file: foo, category = [a],    value = 123, timestamp = 1 }
{ file: bar, category = [a, b], value = 321, timestamp = 1 } 
...

I am displaying a line chart over time of the sum of value across all files for each category, so 2 lines are displayed (one for category a, one for category b).

The problem comes when the user wants to filter only for category a: the expectation is to see only 1 line (category a), but the line for category b still remains, due to the fact that there is a document for which category = [a, b].

Is it possible to configure the Line Chart (Lens or Aggregation-based) to only display 1 line when the user filters for a given category?

One solution is to send normalized (flattened) data instead, but this leads to value being duplicated and so the sum is incorrect.

Thanks!

Hi @tinrik

how are you breaking down categories in the chart? Are you using a Top values or explicit Filters?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.