// Fixed chart for period before the store creation
This commit is contained in:
@@ -125,7 +125,7 @@ UPDATE `PREFIX_hook_module` SET position = 5
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockmyaccountfooter')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 3
|
||||
UPDATE `PREFIX_hook_module` SET position = 6
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcontactinfos')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
|
||||
@@ -238,15 +238,18 @@ class Dashtrends extends Module
|
||||
$chart_data = array();
|
||||
foreach (array_keys($this->dashboard_data) as $chart_key)
|
||||
{
|
||||
$calibration = array_sum($this->dashboard_data[$chart_key]) / count($this->dashboard_data[$chart_key]);
|
||||
$chart_data[$chart_key] = $chart_data_compare[$chart_key] = array();
|
||||
|
||||
if (!$count = count($this->dashboard_data[$chart_key]))
|
||||
continue;
|
||||
|
||||
$calibration = array_sum($this->dashboard_data[$chart_key]) / $count;
|
||||
|
||||
$chart_data[$chart_key] = array();
|
||||
foreach ($this->dashboard_data[$chart_key] as $key => $value)
|
||||
$chart_data[$chart_key][] = array(1000 * $key, $calibration ? 100 * $value / $calibration : 0);
|
||||
|
||||
if ($this->dashboard_data_compare)
|
||||
{
|
||||
$chart_data_compare[$chart_key] = array();
|
||||
foreach ($this->dashboard_data_compare[$chart_key] as $key => $value)
|
||||
$chart_data_compare[$chart_key][] = array(1000 * $key, $calibration ? 100 * $value / $calibration : 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user