-
Notifications
You must be signed in to change notification settings - Fork 2
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
Repeating for dynamic color lengths #9
Comments
Hey @nelsonsbrian, First of all, I apologize for the late reply. Does something like this address your needs?
The colors parameter now accepts a function typed as:
This allows to dynamically adjusting colors based on the series or coordinates, here is example usage
With both coordinates and series available in the function, you can implement something like what you mentioned—calculations based on data length. This feature is available in the latest version. Let me know if you need anything else, and once again, I apologize for the delay! |
What I had done is create a helper function:
Then I can dynamically pass in a width and get my expect coloring. My width widely variable, ~3-80 or so...
I'll put a task to look at your recent 4.1.1 version and compare. |
No worries on the delay. |
hello, really happy with the library. Really graet job.
One suggestion could be to automatically wrap the colors.
Meaning, if I provide 3 in the colors array, that if I also have 6 series, the series 4-6 would get the same colors as 1-3. Do something like 'colors % colors.lenth
My particular use case is that I don't necessarily know how many series I have at compile time, so to have colors, I'd need to do some computing magic, when I could just supply a few colors and they would get repeated.
Thanks again and let me know if what I suggested wasn't clear.
The text was updated successfully, but these errors were encountered: