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. Image for the cookie policy date


hey I have a report where I have a test which can be taken in either training or testing mode. I want to display 2 bars for one x value. here is my ascx:

<ej:Chart ID="PercentagesChart" runat="server" Width="970" Height="600"  OnClientLoad="onChartLoad" IsResponsive="true">
            <PrimaryXAxis Title-Text="Product" LabelRotation="45" />
            <PrimaryYAxis Title-Text="Pass/Fail Percentage(%)" />
            <CommonSeriesOptions EnableAnimation="True" Type="StackingBar100" Tooltip-Visible="true" 
                Tooltip-Format=" #series.name# &lt;br/> X :  #point.x# <br/> Y :  #point.y#  <br/>Percentage :  #point.percentage# %" />
             <ej:Series Name="Testing Pass" XName="Name" YName="TestingPass"></ej:Series>
             <ej:Series Name="Testing Fail" XName="Name" YName="TestingFail"></ej:Series>

             <ej:Series Name="Training Pass" XName="Name" YName="TrainingPass"></ej:Series>
             <ej:Series Name="Training Fail" XName="Name" YName="TrainingFail"></ej:Series>
            <Title Text="<%$ Resources:ReportResource, General %>"></Title>
            <Legend Position="Right" Alignment="Near"></Legend>

my vb class:
 <Serializable()> _
    Public Class BarChartDataPercentage
   Public Property Name As String
   Public Property TestingPass As Double
   Public Property TestingFail As Double
            Public Property TrainingPass As Double
   Public Property TrainingFail As Double
    End Class

Where I have the separate <Series> I would like those to be 2 separate bars.
Any ideas on how to do that?

3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team March 10, 2017 05:37 AM UTC

Hi Gideon, 

Thanks for contacting Syncfusion support. 

We have analyzed your query with the provided code snippet. Your requirement of grouping the stacking bar series can be achieved by using the StackingGroup property in series. In this, you can specify the name of which series collection have to be grouped together. Find the code snippet below. 


             <ej:Series XName="Xvalue" YName="TestingPass" StackingGroup="Test" Fill="lightgreen"></ej:Series> 
             <ej:Series XName="Xvalue" YName="TestingFail" StackingGroup="Test"  Fill="green"></ej:Series> 
             <ej:Series XName="Xvalue" YName="TrainingPass" StackingGroup="Training"  Fill="blue" ></ej:Series> 
             <ej:Series XName="Xvalue" YName="TrainingFail" StackingGroup="Training"  Fill="cyan"></ej:Series> 


Sample for reference can be downloaded from below link. 


GI Gideon March 13, 2017 07:11 PM UTC

Ok thank you for the quick response that worked perfectly

DD Dharanidharan Dharmasivam Syncfusion Team March 14, 2017 06:13 AM UTC

Hi Gideon, 
Thanks for your update. 
Kindly revert us, if you require further assistance. 


Live Chat Icon For mobile
Up arrow icon