
Explanation:

To summarize security events over the last week and chart them by day, use KQL time binning on the event timestamp. In Sentinel/Log Analytics, bin() groups records into fixed time buckets on a datetime column- here, TimeGenerated. Pair that with a time filter for the past 7 days and render as a timechart. The key pattern is:
SecurityEvent
| where TimeGenerated >= ago(7d)
| summarize Count = count() by bin(TimeGenerated, 1d)
| render timechart
* bin is the correct aggregator for time-based bucketing.
* TimeGenerated is the standard timestamp column used across Sentinel tables for ingestion time.
* Using a 1-day bin shows the daily counts; the where TimeGenerated >= ago(7d) limits results to the past week.
* render timechart visualizes the grouped counts over time.
In the answer area shown, you select bin and TimeGenerated; (the full query would also include the where line and a 1d bin size to meet the "by day" requirement).