1👍
✅
You can convert the date into a day of the week inside your PHP code using DateTime
objects:
foreach ($result as $page_row) {
$page_row['pagedate'] = (new DateTime($page_row['pagedate']))->format('l');
$data[] = $page_row;
}
0👍
Seems like the issue is within chart.js under chartdata (labels: pagedate
).
You could write a separate function to convert the date to its corresponding named day according to this post.
Then just change it to labels: myFunction(pagedate)
Source:stackexchange.com