Hi Ahmed,
Please check out these resources
- Sparse timeseries might answer your question: https://www.elastic.co/blog/sparse-timeseries-and-timelion
- A bit of background on how we deal with 'null' + the issue for improving it: https://github.com/elastic/kibana/issues/17717