How can I draw the moving average on the number of events per day on kibana dashboard?

Hi, I know that Kibana dashboard can easily draw the line or histogram on the number of events per day. However, I would like to draw the moving average (maybe 3-day MA or 7-day MA) on the number of events of each day. How can I do this? Any information or suggestion would be helpful:)