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.

Stacked Column Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

110212 Jul 24,2013 03:34 PM Aug 1,2013 06:10 AM ASP.NET MVC (Classic) 3
loading
Tags: Chart
Tony Basallo
Asked On July 24, 2013 03:34 PM

I am a very difficult time trying to get a stacked chart set up. Could I please get some help with this?

I am looking to have dates on the x axis and numbers on the y axis. I would then stack multiple values for each date. I have attached a sample (from Excel) what it looks like.

Thank you for any help you can provide.

P.S. The sample has two set of stacked columns for each date (red and blue)


chart_6836e8fd.zip

Anandaraj T [Syncfusion]
Replied On July 25, 2013 07:25 AM

Hi Tony,

Thanks for using Syncfusion products.

Stacking column charts require two or more series. They are similar to column charts except that the y values stack on top of each other in the specified series order.

Please refer the following code snippet to achieve this:
<code>
[CS]

MVCChartModel chartModel=new MVCChartModel();
ChartSeries series=new ChartSeries("Series1", ChartSeriesType.StackingColumn);
series.Points.Add(1,400);
series.Points.Add(2,500);
series.Points.Add(3,600);
series.Points.Add(4,500);
chartModel.Series.Add(series);
ChartSeries series1=new ChartSeries("Series2", ChartSeriesType.StackingColumn);
series1.Points.Add(1,200);
series1.Points.Add(2,300);
series1.Points.Add(3,400);
series1.Points.Add(4,500);
chartModel.Series.Add(series);

</code>

For more information about stacking column charts, please refer our online documentation in the following link:
Stacking Column Chart

Our online sample for stacking column chart is available in the following link:
Stacking Column

In the above online sample link, stacking column charts can be viewed by selecting "StackingColumn" option from the styles combo box below the column chart that appears.

Please let us know if you have any concern.

Regards,
Anandaraj

Tony Basallo
Replied On July 25, 2013 02:10 PM

HI,

I was able to implement the example and that worked.

However, if I try to do the same example, but with dates in the Y axis, it falls apart. The dates repeat on the bottom. Should dates work the same way in the x-axis?


Anandaraj T [Syncfusion]
Replied On August 1, 2013 06:10 AM

Hi Tony,

Thanks for the update.

We would like to hear more details about your requirement, since we are unable to understand the requirements from your previous update.

1. Could you please share the reason for using date time values in y axis? Generally, date time values are used for y-axis in chart types such as bar, stacking bar, stacking bar 100.
2. Could you provide a screenshot explaining your requirement?

The information provided would be of great help in providing a solution to your requirements.

Please let us know if you have any concern.

Regards,
Anandaraj

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.

;