Fixed date range calculations.
This commit is contained in:
1 parent
9f112c8cc9
commit
38abd673f3
8 files changed
+55
-21
No files matched your search
@@ -14,7 +14,7 @@ export default function PageviewsChart({ data, unit, children }) {
|
||||
const n = data.pageviews.length;
|
||||
switch (unit) {
|
||||
case 'day':
|
||||
if (n > 7) {
|
||||
if (n >= 15) {
|
||||
return index % ~~(n / 15) === 0 ? format(d, 'MMM d') : '';
|
||||
}
|
||||
return format(d, 'EEE M/d');
|
||||
|
||||
Reference in new issue
Block a user