The point is if you apply a straight timechart without the stats command, you will get an output with time as first column and the names of the HCS field from column 2 onwards.
Now, that is not what you needed. the key here are the bin and the stats commands.
the bin is used to split time into 1 day intervals. the stats counts the HCS values against the time split of 1 day each.
Remove all code after the stats and see the output, you will get 3 columns, _time, the field names for HCS and a third column 'count'.
Now , I simply take the values of the count, values(count) and apply a timechart.
The reason why my first code was just giving you 1 or 0 is because i was using timechart count, which was merely counting the count (occurences) of the stats command output and not the values of the count as you wanted.
I am sure if you see the output till the stats command after removing rest of the code , you will understand.
Please accept the answer if this resolves your issue 🙂
... View more