We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Combination chart with Stacked Bar

Thread ID:

Created:

Updated:

Platform:

Replies:

130117 Apr 23,2017 08:50 AM Apr 24,2017 02:17 AM JavaScript 1
loading
Tags: ejChart
Dwaine Maltais
Asked On April 23, 2017 08:50 AM

We are using the JavaScript chart control in one of our projects and we're trying to set up a combination spline/stacked column chart.  We've reviewed the documentation/demo for the combination chart but are having difficultly with the syntax to add a new series in the column to create the stack.  We're going for an end result similar to the image below.  Do you have any examples that show multiple series in a combination?  Thanks.



Dharanidharan Dharmasivam [Syncfusion]
Replied On April 24, 2017 02:17 AM

Hi Dwaine, 

Thanks for contacting Syncfusion support. 

We have analyzed your query. To stack the column series you can use stackingColumn series type. With respect to the screenshot, we have prepared a sample, in which the first two series are rendered as stackingColumn and for third series we have used spline type and bind it to the secondary Y axis, to achieve your requirement. Find the code snippet below. 

JS: 

$("#container").ejChart( 
        { 
//Axes to add spline series 
           axes: [{ 
                    majorGridLines: 
                    { 
                             visible: false 
                    }, 
                    orientation: 'Vertical', 
                    opposedPosition: true, 
                    axisLine: { visible: false }, 
                    name: 'yAxis', 
                   range: { min: 0, max: 12, interval: 2 } 
                } 
            ], 
 
         series: [ 
                     { 
                          //... 
                          type: 'stackingcolumn', 
                     }, 
                     { 
                         //... 
                         type: 'stackingcolumn', 
                     }, 
                    { 
                      //... 
                      yAxisName: 'yAxis', 
                      type:"spline"  
                    }, 
            ], 
});           

Screenshot: 
 

Sample for reference can be find from below link. 

Thanks, 
Dharani. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;