Hide weekends for date histogram field in time series in graph

this is a workaround at best but could be an interesting option to try. Longer term answer below

Use a runtime field to emit the date as a string at the right granularity with the weekend logic. Use "Top Values" and rank by alphabetical


ZonedDateTime input = doc['@timestamp'].value;

String output = input.format(DateTimeFormatter.ofPattern('yyyy-mm-dd'));

emit(output);

I have groomed the existing request for this and added a quote / screenshot from this discussion for the longer term fix. [Lens] Time series only for weekdays · Issue #2942 · elastic/kibana · GitHub - I agree we should have native support for this in the date histogram.