Home forums Using CanvasJS Customize shaded area direction in Area Chart

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

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15861

    cancanvas
    Member

    Hi There,

    I want to fill areas under the data points always using area chart. However, when data points are negative, canvasJS fill the area above the datapoint by default. Any suggestions?

    Thanks!

    #15865

    Indranil Deo
    Member

    @cancanvas,

    Please take a look at this jsfiddle.

    ____________
    Indranil Deo,
    Team CanvasJS

    #15877

    cancanvas
    Member

    Hi Indrani,
    Thanks for the quick response. However, what I need is to shade the area between the line serie and x-axis instead of x=0 line.

    #15880

    Indranil Deo
    Member

    @cancanvas,

    Please provide a pictorial representation of your requirement so that we can understand your problem better and help you accordingly.

    ____________
    Indranil Deo,
    Team CanvasJS

    #15920

    cancanvas
    Member

    This forum does not allow me to attach an image. I am not able to provide pictural presentation.
    Basically, I want the area chart always shade the area below the line. In currently implementation of your area chart, you shade the area above the line if the value is negative. I want to shade the area below the chart even though the value is negative. Is it doable? Thanks a lot!

    #15921

    Indranil Deo
    Member

    @cancanvas,

    You can use rangeArea chart instead of area chart to show filled area even for negative dataPoints as a work-around. Please take a look at this jsfiddle.

    ___________
    Indranil Deo,
    Team CanvasJS

    • This reply was modified 2 months, 3 weeks ago by  Indranil Deo.
    #15927

    cancanvas
    Member

    Thank you Indranil. This is all I need!

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

You must be logged in to reply to this topic.