Home Forums Chart Support X Axis Strip Line

X Axis Strip Line

Viewing 2 posts - 1 through 2 (of 2 total)
  • #30545

    I have an X axis of dates using the label property as they are string values of Month-Year. I would like to place numerous vertical strip lines with the value as a full date but the value property expects an integer.

    As an example (ignore the dots please), “|” are the strip line
    Aug 6 2012 Oct 7 2012
    ……|……….|
    ……|……….|
    ……|……….|
    ___|______|__________________
    July 12 Oct 12 Jan 12 etc

    • This topic was modified 4 years, 4 months ago by wphilips.
    • This topic was modified 4 years, 4 months ago by wphilips.
    • This topic was modified 4 years, 4 months ago by wphilips.
    #30553

    @wphilips,

    When x-values are not provided in the dataPoints, internally it takes x-value as 0, 1, 2,… and increases based on the number of dataPoints. You can add stripLine according to the above scenario by passing the value as an integer. Please take a look at this JSFiddle for the same.

    You can also pass Date object to x-value of dataPoint instead of label and format the label according to your requirements with the help of valueFormatString. In this scenario, you can pass the date as a Date object within the stripLine.

    ___________
    Indranil Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.