jQuery sparklines - Possible to fill above line?
-
24-10-2019 - |
Question
Looking at the sample graphs on the jQuery Sparklines page, you can see that there is a fillColor
attribute that can be used to fill in the area below a line. However, is there any way to specify a fill color for above a graph line?
Solution
The plugin doesn't have an option for that at the current time, but I'll put it on the todo list for the next version.
OTHER TIPS
You could put the sparkline into a box that has your desired "above" color, and then set the "below" color to white. That would create that effect.
Otherwise you would have to change the source code, I am afraid. Should not be too hard.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow