Home › forums › Using CanvasJS › Odd/Even Plot Background Colors
Tagged: interlacedColor, striplines
This topic contains 2 replies, has 2 voices, and was last updated by Cristi S. 1 year, 1 month ago.
I am aware of both interlacedColor and stripLines. But wondering if is it possible to:
1. provide two different interlacedColor values, for odd and even bands. Or how can we easily do this with repeating stripLines?
2. provide one single color for the whole plot area. Similar to a stripLine covering the whole canvas area.
3. why you do not provide one simple background color property for the plot area, to nicely cover all these cases?
Providing two different values for interlacedColor is not available as of now. You can create a stripLine starting from viewPortMinimum to viewPortMaximum which would act as second value for interlacedColor. Please, take a look at this jsFiddle.
We have backgroundColor that covers whole canvas. But if you need background color just to cover the plotArea, you can use striplines as a work-around for now.
Background color for plotArea is in our roadMap, but we don’t have any timeline for it yet. Thank you, for suggesting it though. I’ll forward it to my other team members.
Wow, brilliant hack to get the min/max values! :) Thanks, Bivek.
For one single plot area background color, we could also comment out the “interlacedColor:” line from your fiddle.
You must be logged in to reply to this topic.