For Jira Webwork, How to make the vertically stored ActiveObject data to Horizontal display of data using velocity template?

I wanted to Display it in this Format using velocity.
https://i.stack.imgur.com/LTrN8.png

I got all the Data from the Jira Webwork Action Class Method $action.getUniqueMonth(). But i am Unable to Print that properly in the Horizontal Way.

 <table class="aui">     
 <thead>             
    <th id="Project">Project</th>                                       
            #foreach($uniqueProject in $action.getUniqueMonth())                                            
                <th id="month">$uniqueProject</th>  
            #end
</thead>
<tbody> 
        #set ($maps = $action.getUniqueProject())
        #set($map = $maps.keySet())
        #foreach ($mapEntry in $map)
            <tr> <td>$mapEntry</td> <td>$maps.get($mapEntry)</td>
            #foreach($feedback in $action.getAllSurvey())                                           #if($mapEntry == $feedback.getProject())
                #foreach($month in $months)
                    #tablerows($feedback.getFeedbackMonth() $month) 
                #end
            #end
        #end    
        </tr>

#macro( tablerows $feedMonth $month )
   #if($feedMonth == $month)        
      <td>$feedback.getRating()</td>                          
   #end                                                                     
#end