grafana/public
David 57abf39f25
Logs: Use result range instead of timepicker range for log histogram (#25027)
* Logs: Use result range instead of timepicker range for log histogram

If a logs datasource does not send histogram data for the requested
time range, the logs model computes a timeseries based on the log row
counts, bucketed by an automcatically calculated time interval. Even
when this histogram time series did not span the whole requested time
range it was still rendered in the graph across the whole range, leaving
an empty area at its start. Users find this confusing and are lead to
believe their log data is missing.

This change fixes this by anchoring the start of the timeseries on the
first log row's timestamp from the result, and adds this smaller range
as `visibleRange` to the logs model and passes it through to the logs
component that optionally takes it into account to not render the empty
area.
The interval (bucket size) is also adjusted to account for a potentially
finer resolution on the shorter visible time interval.
The bucketsize multiplier was also changed from 10 to 20 to account for
the space between the chart's bars.

* Aligned visible range with buckets

* Extract bucket size calculation and add test
2020-05-29 15:39:13 +02:00
..
app Logs: Use result range instead of timepicker range for log histogram (#25027) 2020-05-29 15:39:13 +02:00
dashboards Onboarding: New getting started panel (#23826) 2020-05-13 08:00:40 +02:00
e2e-test/screenShots/theOutput Migration: Migrate Dashboard Import to React (#22338) 2020-03-31 16:29:44 +02:00
e2e-tests/videos FieldOverrides: Move FieldConfigSource from fieldOptions to PanelModel.fieldConfig (#22600) 2020-03-19 11:50:31 +01:00
emails Emails: Fixed a (very small) typo (#24586) 2020-05-12 18:09:24 +02:00
fonts Chore: fix modes for non-executable files (#16864) 2019-05-03 09:51:53 +02:00
img Onboarding: New getting started panel (#23826) 2020-05-13 08:00:40 +02:00
sass Datasources: fix pre styles (#24687) 2020-05-14 16:04:53 +02:00
test Dashboard: Remove isTimezoneUtc (#24754) 2020-05-18 10:21:21 +02:00
vendor Graph: Fixed issue with x-axis labels showing "MM/DD" after viewing dashboard with pie chart . 2020-05-06 16:05:00 +02:00
views @grafana/ui: Replace various icons using Icon component (#23442) 2020-04-12 22:20:02 +02:00
robots.txt add support for robots.txt file 2015-06-15 19:02:38 -04:00