Subversion Repositories SmartDukaan

Rev

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

Rev 15128 Rev 15193
Line 34... Line 34...
34
  <?php foreach ($preferences_set as $key => $value):?>
34
  <?php foreach ($preferences_set as $key => $value):?>
35
    var temp = [new Date("<?php echo $value[0]['date'];?>") , <?php echo $value[0]['count'];?>];
35
    var temp = [new Date("<?php echo $value[0]['date'];?>") , <?php echo $value[0]['count'];?>];
36
    brandpreferences.push(temp);
36
    brandpreferences.push(temp);
37
  <?php endforeach;?>
37
  <?php endforeach;?>
38
  var preferences = [];
38
  var preferences = [];
39
  preferences.push(['Brand Preferences Set','Number of Users']); 
39
  preferences.push(['Preferences','Yes','No']); 
40
  preferences.push(['Yes','<?php echo $usersWithBrandPreferencesSet[0][0]['count'];?>']); 
-
 
41
  preferences.push(['No','<?php echo ($totalUsers[0][0]['count'] - $usersWithBrandPreferencesSet[0][0]['count']);?>']); 
40
  preferences.push(['Brands',<?php echo $usersWithBrandPreferencesSet[0][0]['count'];?>,<?php echo ($totalUsers[0][0]['count'] - $usersWithBrandPreferencesSet[0][0]['count']);?>]);
42
	
41
	
43
  google.load('visualization', '1', {packages: ['corechart', 'line']});
42
  google.load('visualization', '1', {packages: ['corechart', 'line']});
44
	google.setOnLoadCallback(drawBasic);
43
	google.setOnLoadCallback(drawBasic);
45
 
44
 
46
	function drawBasic() {
45
	function drawBasic() {
Line 116... Line 115...
116
  		};
115
  		};
117
  		var chart4 = new google.visualization.PieChart(document.getElementById('devices_chart_div'));
116
  		var chart4 = new google.visualization.PieChart(document.getElementById('devices_chart_div'));
118
  		chart4.draw(devicesdata, options4);
117
  		chart4.draw(devicesdata, options4);
119
 
118
 
120
      var preferencesdata = google.visualization.arrayToDataTable(preferences);
119
      var preferencesdata = google.visualization.arrayToDataTable(preferences);
-
 
120
      // var options6 = {
-
 
121
      //   title: 'Preferences Set'
-
 
122
      // };
121
      var options6 = {
123
      var options6 = {
122
        title: 'Brand Preferences'
124
        title: 'Preferences Set',
-
 
125
        chartArea: {width: '50%'},
-
 
126
        isStacked: true,
-
 
127
        hAxis: {
-
 
128
          title: 'Total Users',
-
 
129
          minValue: 0,
-
 
130
        },
-
 
131
        vAxis: {
-
 
132
          title: 'Type'
-
 
133
        }
123
      };
134
      };
124
      var chart6 = new google.visualization.PieChart(document.getElementById('preferences_chart_div'));
135
      var chart6 = new google.visualization.BarChart(document.getElementById('preferences_chart_div'));
125
      chart6.draw(preferencesdata, options6);
136
      chart6.draw(preferencesdata, options6);
126
    }
137
    }
127
    </script>
138
    </script>