Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7602425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:24:32+00:00 2026-05-30T23:24:32+00:00

I created a StackedColumn chart using the built in .NET 4.0 controls. The charts

  • 0

I created a StackedColumn chart using the built in .NET 4.0 controls.
The charts are coming out properly.
I want to make it look 3-D though.
I am able to do that by using XAML. But I am unable to do the same using code behind.

Please see my code behind. I have a Chart, and a ChartArea. I saw that the code to enable 3-D is as follows:

Chart1.ChartAreas["Default"].Area3DStyle.Enable3D = true;

But I get an error at Runtime as follows:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

I also tried using the following options (where cArea is the instance of ChartArea) :

cArea.Area3DStyle.Enable3D = true;

Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;

Chart1.ChartAreas[0].Area3DStyle.Enable3D = true;

Is there any difference in where I set these properties. I tried all the 3 above statements before I add the Chart1 element.

The code behind I use is :

        Chart1.Series.Clear();
        Chart1.ChartAreas.Clear();

        ChartArea cArea = new ChartArea("Default");
        Chart1.ChartAreas.Add(cArea);

        // ABLE TO USE cArea to change properties.... !!!
        cArea.AxisX.LabelStyle.Angle = +80;
        cArea.AxisX.LabelStyle.Interval = 1;
        cArea.BackColor = Color.Beige;



        foreach (var g in groups)
        {
            Series s1 = new Series(g.Key);
            Chart1.Series.Add(s1);

            s1.ChartType = SeriesChartType.StackedColumn;
            s1["PointWidth"] = "0.7";
            foreach (var m in g)
            {
                s1.Points.AddXY(m.Category, m.Count);
            }
            s1.IsValueShownAsLabel = true;
            s1.ToolTip = "#VALY";
        }


        this.Controls.Add(Chart1);

The XAML is :

<asp:Chart ID="Chart1" runat="server" ImageLocation="~/FolderLoc/Chart_#SEQ(1000,0)"     ImageStorageMode="UseImageLocation" ImageType="Png" >
</asp:Chart>

I am however able to use the cArea to change other properties as part of my chart as shown in the code:

// ABLE TO USE cArea to change properties.... !!!
cArea.AxisX.LabelStyle.Angle = +80;
cArea.AxisX.LabelStyle.Interval = 1;
cArea.BackColor = Color.Beige;

When using Static data, I am able to set the “Enable3D” to TRUE with the XAML as :

   <chartareas>
       <asp:ChartArea Name="Default">
           <Area3DStyle Enable3D="True" />
       </asp:ChartArea>
   </chartareas>

Can you please tell me how to make the chart 3-D enabled?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:24:33+00:00Added an answer on May 30, 2026 at 11:24 pm

    Two things to try:

    Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
    
    Chart1.ChartAreas[0].Area3DStyle.Enable3D = true;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Chart library in .Net 4.0 to create a stacked column chart
I created the register form in asp.net. And I want to validate Name. This
I'm using the asp.net Chart control to present a stacked bars chart. I can
Created .NET WCF service, tested it - works. Generated schemas from Data and service
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I created a few mediawiki custom tags, using the guide found here http://www.mediawiki.org/wiki/Manual:Tag_extensions I
I created a simple .NET windows application in Visual Studio 2005 and on just
I created a new SharePoint portal for testing purposes using a manually added HOSTS
Does anybody know, how to make chart like this? I have not found any
Created an Accordion side bar using jQuery 1.2.6. I cannot access newer version of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.