Ejemplo n.º 1
0
 public static function getMonthLabelPrice($monthlyDay)
 {
     $date = new DateTime('now');
     $date->modify('first day of this month');
     $startdate = $date->format('Y-m-d') . ' 00:00:00';
     $date->modify('first day of next month');
     $enddate = $date->format('Y-m-d') . ' 00:00:00';
     $days = explode(', ', $monthlyDay);
     $price = '';
     $prefix = '';
     foreach ($days as $day) {
         $dayPrice = ceil(DigiComHelperChart::getAmountDaily($day));
         $price = $price . $prefix . $dayPrice;
         $prefix = ', ';
     }
     return $price;
 }
Ejemplo n.º 2
0
?>
</p>
			 	</div>
			 </div>
		</div>

		<div class="panel">
			<div class="panel-header clearfix">
				<h3 class="panel-title"><span class="icon-bars"></span> <?php 
echo JText::_('COM_DIGICOM_REPORTS_SALES_ANALYTICS');
?>
</h3>
			</div>
			<?php 
$monthlyDay = DigiComHelperChart::getMonthLabelDay();
$monthlyPrice = DigiComHelperChart::getMonthLabelPrice($monthlyDay);
?>
			<div class="panel-content"> 
				<div><canvas id="myChart" width="945" height="200"></canvas></div>
			  
			  	<script type="text/javascript">
			  		var data = {
					    labels: [<?php 
echo $monthlyDay;
?>
],
					    datasets: [

					        {
					            label: "Monthly Report",
					            fillColor: "#e6f3f9",