Home forums Using CanvasJS Stacked Line Chart

This topic contains 4 replies, has 3 voices, and was last updated by  himanshu_tanwar 4 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21380

    Is there any way to stack line chart?

    #21385

    Priyanka M S
    Member

    [Update]
    You can achieve stacked line chart with the help of stacked area chart by setting fillOpacity: 0. Please take a look at this jsfiddle.

    himanshu,

    You can achieve stacked line chart with the help of stacked area chart by customizing it with color: "transparent" and using lineColor, markerColor and toolTipContent properties based on your requirement. Please take a look at this jsfiddle.

    __
    Priyanka M S
    Team CanvasJS

    • This reply was modified 4 months, 1 week ago by  Vishwas R.
    #21396

    Thanks Priyanka and Vishwas for the solution.

    Both visually look the same. Is there any advantage of one solution over the other?

    #21399

    Vishwas R
    Keymaster

    @himanshu_tanwar,

    Visually both looks same. But in the previous example you need to handle color of the line, marker, toolTip content, etc where as in the current example provided its just a single property (fillOpacity) that makes your task simpler.


    Vishwas R
    Team CanvasJS

    #21400

    ok thanks

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

You must be logged in to reply to this topic.