Running the similar query on what you have shared.
customMetrics
| where name == "HeartbeatState" or name == "HttpTrigger1 Count"
| summarize hits = count() by name, timestamp
| make-series hits = sum(hits) default=0 on timestamp in range(ago(7d), now(), 1d) by name
| mvexpand timestamp , hits
| project format_datetime(todatetime(timestamp), "MM-dd"),todouble(hits), name
| render barchart kind=unstacked

Possible reason could think of is Azure Dashboard time range overriding the time range of pinned tile. Can you please make sure the overall dashboard time range is equal to "Past 7 days" or beyond, in this case. So that it doesn't override the indivual chart/query. We do see the same chart in the Azure Dashboard.

Hope this helps.