Kibana pie chart that fetches only a substring of a field
By creating a new runtime field, which will remove the 3rd and 4th characters, you can use that field in the Pie chart.
This is an example of that runtime field (of type keyword):
emit(doc['Version'].value.splitOnToken(".")[0] + "." + doc['Version'].value.splitOnToken(".")[1])
Add runtime field to index pattern in kibana