Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

[Feature request] Highlight the legend section for the selected hour #15

Closed
cestevezdev opened this issue Oct 12, 2020 · 5 comments
Closed
Labels
kind/feature New feature request

Comments

@cestevezdev
Copy link

This is a suggestion for improving the readability of the control.
In the current version (0.6.0), the mouse hover on a specific hour provides a tooltip with a pretty good summary for that interval:
image

I wonder if apart from visualizing that tooltip, it would be possible to highlight the legend area for that specific hour. When you have a gradient of similar colors, it is not easy to distinguish the applicable interval (without reading the actual numbers... that takes "more" time):
image
A thin line rounding the applicable box in the legend would be enough. But could be nice other options like a circle in the applicable box:
image

@marcusolsson
Copy link
Owner

I love the idea! Makes total sense for the plugin to be able to show something like that.

The reason why the legend is so low resolution is for performance reasons. The legend currently draws a SVG element for each step along the legend, i.e. higher resolution = more elements = worse performance. It's something I'd like to fix so that we have a nice gradient without the performance hit. In other words, the highlighted region shouldn't depend on the step size.

We could still have a rectangular window of fixed size. Another option would be to have a triangle above or below the legend that points at the current value.

I don't know when I'll have the time to work on this unfortunately. Hopefully within a month.

@marcusolsson marcusolsson added the kind/feature New feature request label Oct 13, 2020
@cestevezdev
Copy link
Author

Thanks for the quick response! (and sorry for my late response :-( )
Definitively that makes sense.
A triangle could do the job:
image

Maybe one of the handicaps could be to select the appropriate color for the triangle, so It could be clearly visible in all gradient positions.

@marcusolsson
Copy link
Owner

Fixed in 5efcf8c.

You can enable it under Legend -> Show value indicator (it's disabled by default).

Screen Shot 2020-12-06 at 20 47 56

@marcusolsson
Copy link
Owner

Available in v0.9.0 🎉

@cestevezdev
Copy link
Author

Wonderful! Thanks for the enhancement!
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants