-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: dynamic time line #1210
base: dev
Are you sure you want to change the base?
feat: dynamic time line #1210
Conversation
Thanks for contributing. |
PR for grid lines is totallly different.
|
That is why I suggested you to think how to add your useful functionality to the current paradigm (related config options should be in one place, may be in a separate section; drawing of lines should be consistent to the existing code). |
Mentioning #1179 to link the PR as related. |
Honestly, i cannot see any useful use case for static grid, even from feature author. Only description is 'Implements #837', which static grid does not cover. Unlike original request is about dynamic grid eg. day separator. |
I see your point. In the perfect scenario, we will have a possibility a draw a grid more "aligned" to a time scale. BTW, assume I defined a line for "12:00". |
I think, it's two different use cases: I use to look at graphs to check when to close windows after venting. A line at "ten minutes ago" would be helpful, indeed. On the other hand, I also hover the graph quite often, just to see the time something happened, e.g. a temperature drop. I wonder, if both could be done with a list of times:
(And then, the question will be, if we're not much more flexible with a list of times than with discrete settings. Admittedly, with a somewhat more clumsy configuration.) |
I did this because I needed a way to visually tell different time measures. |
In my unicorn universe we should use all: |
Using 2 concepts of grid lines seems to me 'over'. It would spoil nice and minimalistic character of the card (that likely be the initial idea). As the graph is essentially dynamic, static grid seems not giving significant added value (for me). |
In my project I want to have some daily times marked for better graph readibility. Or for long term graphs it might be difficult to realize some specific values in time as the graph does not support it.
My sollution adds user specific times as list in configuration that are displayed in graph.

These time lines are tightly coupled with their values, so their position is dynamically rendered along with the graph.
The styling is fully customized by user by <card_mod> as per css class.
Time value could be disabled as well.
On midnight time (when user setup 00:00), graph displays a new date value instead of a time.
Time lines are applied for every day in the graph so long term graphs are supported

The solution requires new config variable 'time_line' with a list of expected times in format HH:MM under the 'show' option as follows: