Subversion Repositories SmartDukaan

Rev

Rev 30774 | Rev 30779 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30774 Rev 30778
Line 61... Line 61...
61
                <td>
61
                <td>
62
                    #set($datasets = $summaryModel.getChartLeadModel().getData().getDatasets().get(0))
62
                    #set($datasets = $summaryModel.getChartLeadModel().getData().getDatasets().get(0))
63
                    #set($dataPoints=$datasets.getData())
63
                    #set($dataPoints=$datasets.getData())
64
                    #set($bgColors=$datasets.getBackgroundColor())
64
                    #set($bgColors=$datasets.getBackgroundColor())
65
                    #set($labels = $summaryModel.getChartLeadModel().getData().getLabels())
65
                    #set($labels = $summaryModel.getChartLeadModel().getData().getLabels())
-
 
66
                    #set($total=0)
66
                    #foreach($dataPoint in $dataPoints)
67
                    #foreach($dataPoint in $dataPoints)
-
 
68
                        #if(!$dataPoint)
-
 
69
                            #set($dataPoint=0)
-
 
70
                        #end
-
 
71
                        #set($total=$total+$dataPoint)
-
 
72
                    #end
-
 
73
                    #foreach($dataPoint in $dataPoints)
-
 
74
                        #set($percentage=($dataPoint/$total)*100)
67
                        #set($count = $velocityCount - 1)
75
                        #set($count = $velocityCount - 1)
68
                        <span style="background-color: $bgColors.get($count)">$labels.get($count)
76
                        <span style="background-color: $bgColors.get($count);width:$percentage%;margin:0;padding:0 ">$labels.get($count)
69
                            - #if($dataPoint) $dataPoint #else 0#end</span>
77
                            - #if($dataPoint) $dataPoint #else 0#end</span>
70
                    #end
78
                    #end
71
                </td>
79
                </td>
72
            </tr>
80
            </tr>
73
            #end
81
            #end