Subversion Repositories SmartDukaan

Rev

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

Rev 30779 Rev 30780
Line 63... Line 63...
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
                    #set($total=0)
67
                    #foreach($dataPoint in $dataPoints)
67
                    #foreach($dataPoint in $dataPoints)
68
                        #if(!$dataPoint)
68
                        #if($dataPoint)
69
                            #set($dataPoint=0)
69
                            #set($total=$total+$dataPoint)
70
                        #end
70
                        #end
71
                        #set($total=$total+$dataPoint)
-
 
72
                    #end
71
                    #end
73
                    #foreach($dataPoint in $dataPoints)
72
                    #foreach($dataPoint in $dataPoints)
74
                        #if(!$dataPoint)
73
                        #if($dataPoint)
-
 
74
                            #set($percentage=($dataPoint*100)/$total)
-
 
75
                        #else
75
                            #set($dataPoint=0)
76
                            #set($percentage=0)
76
                        #end
77
                        #end
77
                        #set($percentage=($dataPoint/$total)*100)
-
 
78
                        #set($count = $velocityCount - 1)
78
                        #set($count = $velocityCount - 1)
79
                        <span style="background-color: $bgColors.get($count);width:$percentage%;margin:0;padding:0 ">$labels.get($count)
79
                        <div style="display:inline;background-color: $bgColors.get($count);width:$percentage%;margin:0;padding:0 ">$labels.get($count)
80
                            - $dataPoint</span>
80
                            - #if(!$dataPoint) 0 #else $dataPoint #end</div>
81
                    #end
81
                    #end
82
                </td>
82
                </td>
83
            </tr>
83
            </tr>
84
            #end
84
            #end
85
        </tbody>
85
        </tbody>