Feature request: relative color thresholds
See original GitHub issueHello, I have an idea to improve the Dynamic line color feature.
Instead of setting absolute values in the color_thresholds
option, it would be great to use relative values.
For example:
color_thresholds:
- value: 0%
color: "#1feaea" # Blue
- value: 50%
color: "#ffd200" # Yellow
- value: 100%
color: "#f72047" # Red
Or even easier, omitting values
color_thresholds:
- color: "#1feaea" # Blue
- color: "#ffd200" # Yellow
- color: "#f72047" # Red
The goal is that the bottom of the graph is always blue and the top is always red, no matter what the values are.
Technically, this is easy to do in SVG:
<defs>
<linearGradient id="my-gradient-id" x1="0" y1="1" x2="0" y2="0">
<stop offset="0" stop-color="#1feaea"></stop>
<stop offset="0.5" stop-color="#ffd200"></stop>
<stop offset="1" stop-color="#f72047"></stop>
</linearGradient>
</defs>
<rect class="line--rect" fill="url(#my-gradient-id)"></rect>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Feature Request: Dynamic or "relative" threshold #3986 - GitHub
I have a use case where I have several series that are generally static over time. That is, the value changes infrequently.
Read more >Target threshold colors attribute
Request many to many task relations ... Target threshold colors attribute ... Extend the functionality of a Wikitext field.
Read more >Configure thresholds | Grafana documentation
Thresholds provide one method for you to conditionally style and color your visualizations based on query results. You can apply thresholds to most,...
Read more >Measuring and Modeling the Feature Detection Threshold ...
The results are used to test the hypothesis that a uniform color space (CIELAB) will accurately model colormapped feature detection thresholds ...
Read more >Contrast (Minimum) - : - Understanding SC 1.4.3 - W3C
This can be exacerbated if the person has a color vision deficiency that lowers the contrast even further. Providing a minimum luminance contrast...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, great suggestion!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!