[echart] Improve tooltip on line echart to represent combination of time grain and time picker values #18473
zuzana-vej
started this conversation in
Ideas
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, users setup time grain and filter time range and these might not always match.
For example: time grain weekly, but time filter is until 03-31-2021 (which is wednesday).
In the new echart Line chart, the X axis has the time periods listed and the tooltip also lists the time period. This always says the full week though. In the case when time granularity doesn't match filter, it can happen that the last week only shows few days of data. Based on the tooltip though, this is not straighforward for the user - especially if chart is accessed in dashboard (not in explore where the time picker range is little more visible).
The proposal is for the tooltip to actually display the correct time range - this can usually apply to the first or last week (for weekly granularity) or first or last month (for monthly granularity).
So in this example:
Weekly granularity.
Filter:
Tooltip for last datapoint would ideally be:
2021-03-29 - 2021-03-30 (because time picker is until <2021-03-31 exclusive)
Instead of current:
Why is this important - in case of charts displaying cumulative value, partial week or partial month usually will have a drop and this leads dashboard consumers to misinterpretting the data.
Chart image:
(in this case we don't face the "drop" issue because values are averaged, just adding a chart image for illustration - that based on that it's seems to user that last week is complete)
Same issue is with current charts, but might be worth it to just implement enhancement with echarts.
Alternatives
There are alternatives to solving this problem, like warning on the chart in case time grain mismatches time picker (or filter) similar to dashboard filter indicator. Or warning on Explore when user sets time grain and filter which don't match.
Beta Was this translation helpful? Give feedback.
All reactions