@markbackhouse wrote:
I have an array of objects, each containing the date (using
new Date()
) in which the object was added to the array.I want to show a bar chart that tells you how many of these objects were added in any given week.
So if I added four new objects to my array this week, I want this week’s section of the bar chart to display 4, and so on.
I was thinking of making each weekly interval on the axes a Sunday-to-Sunday width, but I am unsure how to specify this in Chart.js. Further, I have no idea how to count the number of each object that should go into each interval, thus forming the vertical heights of each bar. Is anyone able to help? Thanks!
Posts: 1
Participants: 1