Suggestion: allow to set custom focus colors for series
See original GitHub issueHi! What do you think about to allow to set series focus color? Currently focus behavior just change alpha of series color, but if I want to make focus behavior a little different (e.g. B&W vs Colored, or a bit darken unfocused lines) I should change colors of series manually and call .redraw()
. I suggest just add property focusStroke/focusFill/...
for series for custom focus colors.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Set up a Focus on iPhone - Apple Support
Choose a color and an icon to represent your Focus, then tap Next. Tap Customize Focus, then set up the options for your...
Read more >iOS 15: How to Customize a Focus - MacRumors
If you want to customize a Focus that's already set up, you can do so by going into Settings -> Focus and selecting...
Read more >Set Up These 6 Focus Modes to Make the Most of iOS 15
Through custom or suggested Focus modes, your iPhone can help you achieve your goals instead of distracting you from them.
Read more >A guide to designing accessible, WCAG-compliant focus ...
A guide to designing accessible, WCAG-compliant focus indicators. Published on 13 Aug, 2021 | Last updated on 05 Sep, ...
Read more >How to set up and use Focus modes on iOS 16 - Computerworld
Apple has packed all the Focus creation tools into one very busy page. To understand the controls on the page, we'll create a...
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
here’s the path of least resistance, i think:
add a
._focus
property to each series that gets toggled here:https://github.com/leeoniya/uPlot/blob/e870fc16cef352fb283a050957ec08374e21a47f/src/uPlot.js#L1854-L1856
then each series can implement dynamic styling by checking that property.
e.g.
https://github.com/leeoniya/uPlot/blob/e870fc16cef352fb283a050957ec08374e21a47f/demos/gradient-fill.html#L73-L81
can you try this route and see how it works out?
@leeoniya Ok, thanks for mention!