Home forums Using CanvasJS Odd/Even Plot Background Colors

This topic contains 2 replies, has 2 voices, and was last updated by  Cristi S. 2 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15224

    Cristi S.
    Member

    Hi guys,

    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?

    Thanks,
    Cristian

    #15228

    Bivek Singh
    Moderator

    @cristiscu

    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.

    —-
    Bivek Singh

    #15229

    Cristi S.
    Member

    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.

    Cheers,
    Cristian

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.