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.

StackingBar100

Thread ID:

Created:

Updated:

Platform:

Replies:

129292 Mar 9,2017 06:49 PM Mar 14,2017 02:13 AM ASP.NET Web Forms 3
loading
Tags: Chart
Gideon
Asked On March 9, 2017 06:49 PM

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# %" />
            
            <Series>
             <ej:Series Name="Testing Pass" XName="Name" YName="TestingPass"></ej:Series>
             <ej:Series Name="Testing Fail" XName="Name" YName="TestingFail"></ej:Series>
            </Series>

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

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?

Dharanidharan Dharmasivam [Syncfusion]
Replied On March 10, 2017 12:37 AM

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. 

ASP.NET: 

<Series> 
             <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> 
</Series> 


Screenshot: 
 

Sample for reference can be downloaded from below link. 

Thanks, 
Dharani. 


Gideon
Replied On March 13, 2017 03:11 PM

Ok thank you for the quick response that worked perfectly

Dharanidharan Dharmasivam [Syncfusion]
Replied On March 14, 2017 02:13 AM

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

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.

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.

;