You must be logged in to post your query.
Home › Forums › Chart Support › X Axis Strip Line
Tagged: strip lines
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
@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
You must be logged in to reply to this topic. Login/Register