$("#chartTooltip").hide();
}
});
+
+ if (!$data.length) {
+ $('#chart').append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">' + WCF.Language.get('wcf.acp.stat.noData') + '</p>');
+ }
}
});
'wcf.acp.stat.timeFormat.daily': '{lang}wcf.acp.stat.timeFormat.daily{/lang}',
'wcf.acp.stat.timeFormat.weekly': '{lang}wcf.acp.stat.timeFormat.weekly{/lang}',
'wcf.acp.stat.timeFormat.monthly': '{lang}wcf.acp.stat.timeFormat.monthly{/lang}',
- 'wcf.acp.stat.timeFormat.yearly': '{lang}wcf.acp.stat.timeFormat.yearly{/lang}'
+ 'wcf.acp.stat.timeFormat.yearly': '{lang}wcf.acp.stat.timeFormat.yearly{/lang}',
+ 'wcf.acp.stat.noData': '{lang}wcf.acp.stat.noData{/lang}'
});
new WCF.ACP.Stat.Chart();
$conditionBuilder->add('objectTypeID IN (?)', array($this->parameters['objectTypeIDs']));
$conditionBuilder->add('date BETWEEN ? AND ?', array($this->parameters['startDate'], $this->parameters['endDate']));
+ $limit = 0;
if ($this->parameters['dateGrouping'] == 'yearly') {
$sql = "SELECT MIN(date) AS date, SUM(counter) AS counter, MAX(total) AS total, objectTypeID
FROM wcf".WCF_N."_stat_daily
".$conditionBuilder."
GROUP BY EXTRACT(YEAR FROM date), EXTRACT(WEEK FROM date), objectTypeID
ORDER BY date";
+ $limit = 260;
}
else {
$sql = "SELECT *
FROM wcf".WCF_N."_stat_daily
".$conditionBuilder."
ORDER BY date";
+ $limit = 365;
}
- $statement = WCF::getDB()->prepareStatement($sql);
+ $statement = WCF::getDB()->prepareStatement($sql, $limit);
$statement->execute($conditionBuilder->getParameters());
while ($row = $statement->fetchArray()) {
$value = $row['counter'];
$d->add(new \DateInterval('P'.($this->loopCount * $this->limit).'D'));
}
for ($i = 0; $i < $this->limit; $i++) {
+ if ($d->getTimestamp() > TIME_NOW) break;
+
// get object types
foreach (ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.statDailyHandler') as $objectType) {
$data = $objectType->getProcessor()->getData($d->getTimestamp());
<item name="wcf.acp.stat.dateGrouping.yearly"><![CDATA[Jahr]]></item>
<item name="wcf.acp.stat.category.com.woltlab.wcf.general"><![CDATA[Allgemeine Daten]]></item>
<item name="wcf.acp.stat.category.com.woltlab.wcf.user"><![CDATA[Benutzer-Daten]]></item>
+ <item name="wcf.acp.stat.noData"><![CDATA[Es liegen keine Daten für den ausgewählten Zeitraum vor.]]></item>
</category>
<category name="wcf.acp.updateServer">
<item name="wcf.acp.stat.dateGrouping.yearly"><![CDATA[Year]]></item>
<item name="wcf.acp.stat.category.com.woltlab.wcf.general"><![CDATA[General Data]]></item>
<item name="wcf.acp.stat.category.com.woltlab.wcf.user"><![CDATA[User Data]]></item>
+ <item name="wcf.acp.stat.noData"><![CDATA[TODO: Es liegen keine Daten für den ausgewählten Zeitraum vor.]]></item>
</category>
<category name="wcf.acp.updateServer">