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

  • SEARCH
  • Home
  • 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 6595407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:56:10+00:00 2026-05-25T17:56:10+00:00

I want to create a chart with Microsoft’s Chart Controls, which looks like this

  • 0

I want to create a chart with Microsoft’s Chart Controls, which looks like this Excel chart:
My Excel chart
Has somebody an idea how to group the elements on the x-axis as on this image?

What I did so far was:

            Series s = new Series("Testseries");
            s.ChartType = SeriesChartType.Line;
            s.Color = Color.Red;

            s.Points.Add(20,65);
            s.Points.Add(17,66);
            s.Points.Add(17,55);

            Chart1.Series.Add(s);

How can I label each data point seperately on the x-axis?

  • 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-25T17:56:11+00:00Added an answer on May 25, 2026 at 5:56 pm

    OK, I solved the problem like this:

            string[] xval = { "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX", "ElementX" };
            for (int i = 0; i < xval.Length; i++)
            {
                Chart1.ChartAreas["ChartArea1"].AxisX.CustomLabels.Add(i + 0.5, i + 1.5, xval[i]);
                Chart1.ChartAreas["ChartArea1"].AxisX.CustomLabels[i].GridTicks = GridTickTypes.TickMark;
            }
    
            // second label row
            Chart1.ChartAreas["ChartArea1"].AxisX.CustomLabels.Add(0, 5.5, "Group1", 1, LabelMarkStyle.LineSideMark);
            Chart1.ChartAreas["ChartArea1"].AxisX.CustomLabels.Add(5.5, 12.5, "Group2", 1, LabelMarkStyle.LineSideMark);
            Chart1.ChartAreas["ChartArea1"].AxisX.CustomLabels.Add(12.5, 21.5, "Group3", 1, LabelMarkStyle.LineSideMark);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a component which can be used like: <mc:chart data=#{bean.data} width=200
I want to create a line chart. Currently my graph look like this The
i want to create one app which draw different charts like pie chart, line
I want to create a chart that looks as much as possible like Google
I want to create excel files in Groovy, then have them plotted. This code
I want to create a bar-chart, but extraordinary high values should be shortened. An
I want to create a ColumnSeries Bar Chart in WPF using C#. I shall
I want create a excel with Apache POI in java and I must insert
I want to create a chart that consists of couples of two bars. one
I have encountered this problem: Depending on numbers from I want to create a

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.