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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:36:47+00:00 2026-06-11T20:36:47+00:00

i have a chart from two columns. In Column A are some result %

  • 0

i have a chart from two columns. In Column A are some result % values and in B i have the corresponding Name to the value.

A   B   
90  Test1   
82  Test2   
66  Test3 

I want the A values as Y axis and already managed that, but i can´t get the names from B to the X-Axis labels.

Range chartRange;
Worksheet xlWorkSheet = (Worksheet)xlWorkBook.Worksheets[1];

ChartObjects xlCharts = (ChartObjects)xlWorkSheet.ChartObjects(Type.Missing);
ChartObject myChart = (ChartObject)xlCharts.Add(10, 80, 300, 250);
Chart chartPage = myChart.Chart;

chartRange = xlWorkSheet.get_Range("A1:B"+movieCount.ToString(), Type.Missing);
chartPage.SetSourceData(chartRange, misValue);
chartPage.ChartType = XlChartType.xlColumnClustered;
  • 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-06-11T20:36:48+00:00Added an answer on June 11, 2026 at 8:36 pm

    You will have to adapt to these settings, otherwise your xvalues will be just a count:

     chartPage.SetSourceData Range("A2:A4"), xlRows
     chartPage.SeriesCollection(1).XValues = Range("B2:B4")
    

    or

     chartPage.SetSourceData Range("A2:A4"), xlColumns
     chartPage.SeriesCollection(1).XValues = Range("B2:B4")
    

    maby there is a another way, but as a quick solution, this would work in VBA – so it should too, when you adapt it to your C# version.

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

Sidebar

Related Questions

I am trying to have the results from two columns in table1 subtracted from
I have a TimeSeries chart, showing up some values per dates and there are
I have a chart generated from Google Charts that can be found here: Chart
Currently i have made a bar chart from a listbox from this example: http://weblogs.thinktecture.com/cnagel/2011/06/wpf-listbox-as-bar-chart.html
I have this XAML from a sample: <chart:RadChart.SeriesMappings> <charting:SeriesMapping LegendLabel=Population> <charting:ItemMapping DataPointMember=YValue FieldName=Population />
Suppose I have a table with a column name varchar(20) , and I store
I have a simple referrers table with three columns: Referrer //string name of partner
I have two tables in my legacy database Purchases Id int(PK) name varchar(50) MasterAccount
i have some complex select and result need to place in the table. I
Some of the dates in a date column have an incorrect year. How do

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.