Home Forums Chart Support Change color of Vertical Grid Line

Change color of Vertical Grid Line

Viewing 4 posts - 1 through 4 (of 4 total)
  • #42176

    is there a way to change the color of the vertical line that matches todays date?

    See link below for a image on Drobpox that helps to explain.

    Chart Example

    Dropbox Image Example

    #42183

    @dpanscik,

    You can use striplines on the X-axis to add a vertical line to your chart. To customise the color of this line, you can use the color property.


    Adithya Menon
    Team CanvasJS

    #42189

    I have the stripline label coming in on a JQUERY datapoint named stripLineLabel

    I am trying to figure out how to use this syntax can you help?

                        stripLines: [
                            {
    
                                startValue: centerLine-43200000,
    			    endValue: centerLine + 43200000,
    			    thickness: 2,
                                color: "#555555",
                                label: "Today: " + dataPoint.stripLineLabel[0],
                                labelFontColor: "#a8a8a8"
                            }]
    #42202

    @dpanscik,

    Passing stripline label property while parsing the JSON received from the service seems to be working fine. Please check out the code snippet below for the same,

    stripLines: [{
        thickness: 2,
        color: "#555555",
        label: "Today: " + jsonData.stripLineLabel[0],
        labelFontColor: "#a8a8a8"
    }]
    

    If you are still facing issue, kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with sample data so that we can look into your code, run it locally at our end to understand the scenario better and help you out.

    —-
    Adithya Menon
    Team CanvasJS

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

You must be logged in to reply to this topic.