Kibana Dashboard - Pie chart from two dependent fields

Hi Team,
I am newbie to Elasticsearch, but trying to make hand dirty.
Trying to develop a pie chart in Kibana dashboard. Want to know how we can link two fields for generating a pie chart.
Sample problem statement: Wanted to project the current temperature vs every state within a country. So user can choose any state within a country and determine the percentage deviation from the country's average temperature in percentage.