Error connecting to postgres 11.5.1 on windows from grafana

Am using postgres v 11.5.1 on windows, no docker vm. Its just running on localhost.
trying to add data source from grafana and its not connecting getting the usual tcp dial error connection refused.
Was able to connect from pgadmin or python program using same config.

Could not find any answer on this, all the answers found were solved by using docker ip. But in my case am not using docker, it just runs on windows. Kindly help.