In a small jar of a mixer-grinder or food processor , grind grated coconut, green chillies and water to a smooth paste. Add more water if required, just enough to make the paste.
Cut the pineapple into small cubes (1/2" to 1", based on personal preference).
On medium high heat, cook the pineapple along with garlic, spice powders, salt and pineapple juice / water. Cook closed till pineapple turns soft and tender, but not mushy.
Whisk yogurt in a separate bowl till smooth. If the yogurt is very thick, add some water to get desired consistency & whisk again. (See notes)
Add the ground coconut paste to the cooked pineapple mixture. Leave to cook for further 5 - 7 minutes.
Remove from heat. Add the whisked yogurt and mix well till you no longer see the white color of yogurt.
Cook on low heat for 1 minute, stirring throughout.
Take the vessel off the stove and keep aside. Taste and add salt, if required.