Grouping legend entries


I'm currently making my first Kibana dashboards and I'm running into an issue. I want to make a Pie chart of values with tags that look like this:

I want the values of all the Node1-* to group together and be visible as 'Node1' in the legend. I can't find how to do this, is this possible?

This is my first question, so apologies if it is not in the right space.


That's not possible with a single field, but you could split it up into two fields - these would be your documents:

{ node: "Node1" subNode: "1" }
{ node: "Node1" subNode: "2" }
{ node: "Node1" subNode: "3" }
{ node: "Node2" subNode: "1" }
{ node: "Node2" subNode: "2" }

Then you can do a two-layer pie chart which is behaving that way already by default:

You don't have to re-index your data to do this, you can create a runtime field for it: Manage data views | Kibana Guide [8.1] | Elastic


Thanks for your reply. Unfortunately there is no way for me to split the names in different parts. Or do you mean that this is something Kibana can do?

I'm sorry, I'm really a beginner.

Best for me would be to be able to group using a wildcard, like "group by Node1*". I take it this is not possible?

That's the runtime field part - Manage data views | Kibana Guide [8.1] | Elastic

You can provide a painless script which is splitting the single field into two in the way to want (painless is a dialect of Java).

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