I am setting up a dashboard with analytics. The analytics are number of clicks.
I have things set up in my database so that when a user clicks on a search result, the corresponding retailers analytics data gets set up to record the current date and adds that to the list of dates the retailers listing has been clicked in search results.
What I am doing is using this list of dates on the dashboard for the purpose of displaying the number of clicks (which is just a count of dates in the list of dates) as well as the number of clicks on a particular date (which is filtering the list of dates based on a particular date).
Currently I have two ways that I may go about setting the numbers to be used in a bar chart. On the page I can have multiple RGs ( I am limiting the date range to 7 days ) for each date in the range of 7 plus the initial RG used to grab the total list of dates.
This is the main RG setup
Each of the 7 RGs will be filtered to contain a list of dates that are the same date—if the main RG list of dates contains 14 items whose date is the same, then those 14 items get stored in the corresponding ‘one of seven’ RG…think about each ‘one of seven’ RG as Mon-Sun but the actual day of week varies dependent on the date range selected.
This is the setup for the first of the seven RG that are filtered.
Another way is to set up custom states and filter the main RG list of dates while setting the value of the custom state as a number.
Here is a workflow to filter and set the custom state value.
Is there some alternative way that would make the process easier?
I wanted to use the toolbox list Expression but really have no idea how to set up an expression to return the results, but also feel like I’ll need 7 list of expressions on page anyway, kind of defeating the purpose.
As clarification, I am using the toolbox list expression from @mishav to capture the list of dates in the date range and I am using this list to filter or match the dates from my main RG.
Here is the setup for the list expression list of dates using the list of numbers both from the toolbox plugin
So the first item in the list expression (the first date in a range) formatted as 6/24/20 is used to filter my main list of dates (total dates the retailer listing was clicked) by matching all the dates in this list whose value formatted as 6/24/20 matches the toolbox list expression. --using the formatting for filtering ignores the time values associated with the dates in the main RG list of dates.
I am planning on watching the List Shifter videos from @keith again to see if I can figure a way to use the iterate a list to do this, but thought to post to see if somebody more familiar with dates, lists, arrays etc would have an idea.
This is the current JS I am running to set up my bar chart…really hoping to ‘clean it up’ by implementing some more advanced or straight forward method than what I’ve been able to come up with.
By the way, I am not a coder, just was able to grab some stuff from codepen to create my own graphs, so really not familiar with setting things up for arrays or lists (I believe those are the same things).
Thanks in advance to anybody who may chime in.