Integrated code to draw charts when a user clicks on a country.