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 6964055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:52:34+00:00 2026-05-27T15:52:34+00:00

i have add three series in a stacked graph. i want to add value

  • 0

i have add three series in a stacked graph. i want to add value at the top of each bar. not each series. because some bar doesn’t have some series.
so, i want to add vaue at the top of each column.

            chart1.Legends.Add("Legend").Alignment = StringAlignment.Center;
            chart1.Palette = ChartColorPalette.None;
            chart1.PaletteCustomColors = new Color[] { Color.FromArgb(0, 255, 0), Color.FromArgb(0, 128, 0), Color.FromArgb(255, 0, 0), Color.Green };

            // Series for the graph.
            Series series1;
            Series series2;
            Series series3;
            Series series4;


            series1= new Series("series1");
            series12= new Series("series2");
            series13= new Series("series3");
            series14= new Series("series4");

    series1.Points.AddXY(values);
            series2.Points.AddXY(values);
    series3.Points.AddXY(values);
    series4.Points.AddXY(values);

            series1.CustomProperties = "PixelPointWidth = 17";
            series2.CustomProperties = "PixelPointWidth = 17";
            series3.CustomProperties = "PixelPointWidth = 2";
            series4.CustomProperties = "PixelPointWidth = 17";

            series3.ChartType = SeriesChartType.Line;
            series3.BorderWidth = 2;
            series3.Color = Color.Blue;

            series1.ChartType = series2 = series4.ChartType = SeriesChartType.StackedColumn;
            series1.Font = series2.Font = series3.Font = series4.Font = new Font("Verdana", 8.25f, FontStyle.Regular);

            chart1.Series.Add(series1);
            chart1.Series.Add(series2);
            chart1.Series.Add(series3);
            chart1.Series.Add(series4);

    foreach (Series series in chart1.Series) 
             {
                 if (series.Name == "series1")
                 {
                     series.ChartType = SeriesChartType.StackedColumn;
                     series["ColumnDrawingStyle"] = "series1Style";
                     series["LabelStyle"] = "Top";
                     // this willl shows the label at top of bar   
                     series.IsValueShownAsLabel = true;
                 }
             }  
  • 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-27T15:52:35+00:00Added an answer on May 27, 2026 at 3:52 pm

    I believe you want to show some Total on top of the StackColumn and not in the center of the Column as is the case with the stacked type.

    Then it would be better to add one more series which is the Total and it could be say of ChartType = Bubble and then you can only set labels for this series and disable for the forming making part of the stacked column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add dynamic series in the chart. I have a data like
I have a problem where I have to add thirty-three integer vectors of equal
I have a custom listview with three items. One of them is like Add
I have a series of svg rectangles (using D3.js) and I want to display
I have three classes that are closely coupled to each other, and I would
Hello I have a 1000 data series with 1500 points in each. They form
I have a series of XML files which I need to add a few
I have a series of divs: <div class=some_class active>Some Content</div> <div class=some_class>Different Content</div> <div
In the MS Chart control (which they bought from Dundas), I have three series
I have some XAML like this drawing a scatterplot of a time series (X-Axis:

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.