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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:23:36+00:00 2026-05-28T00:23:36+00:00

So I’m binding a list of custom business objects to a Rad chart, for

  • 0

So I’m binding a list of custom business objects to a Rad chart, for this instance, an overview of monthly revenue for a year. The dates that I’m setting for the X-axis Label aren’t rendered as what I’ve set them at all.

Here’s my basic code, you can see that get a list of monthLedger objects for a given year. The monthLedger object has different properties, but the main ones for this scenario are monthLedger.Full_date and monthLedger.Revenue_Amount.

List<monthLedger> year = getYearRevenueByMonth(2011);

DataSeries ser = new DataSeries();

foreach(monthLedger month in year)
{
    ser.Add(new DataPoint 
            { 
                YValue = Convert.ToDouble(month.Revenue_Amount), 
                Label = month.Revenue_Amount.ToString("0.00###"), 
                XValue = month.Full_Date.ToOADate()
            });
}


radChart1.DefaultView.ChartArea.AxisX.IsDateTime = true;
radChart1.DefaultView.ChartArea.AxisX.AutoRange = true;
radChart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "dd-MMM";
radChart1.DefaultView.ChartArea.DataSeries.Add(ser);

Here is the data that I would get in the list for 2011 (Full_Date || Revenue_Amount):

  • {01/01/2011 12:00:00 AM} || 0.00
  • {01/02/2011 12:00:00 AM} || 0.00
  • {01/03/2011 12:00:00 AM} || 0.00
  • {01/04/2011 12:00:00 AM} || 0.00
  • {01/05/2011 12:00:00 AM} || 0.00
  • {01/06/2011 12:00:00 AM} || 0.00
  • {01/07/2011 12:00:00 AM} || 0.00
  • {01/08/2011 12:00:00 AM} || 0.00
  • {01/09/2011 12:00:00 AM} || 0.00
  • {01/10/2011 12:00:00 AM} || 0.00
  • {01/11/2011 12:00:00 AM} || 246.50
  • {01/12/2011 12:00:00 AM} || 311.60

What I expect to get is a nice chart with 12 months, but 13 columns end up being graphed and the dates labeled are not at all the same as the ones I’ve converted to OLE Automation Date.

I’ve attached a screenshot of the graphic result:
enter image description here

What am I doing wrong?

  • 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-28T00:23:36+00:00Added an answer on May 28, 2026 at 12:23 am

    As I can see from your Image the Chart plots the bars with Step of 30 days. This is caused by the Automatic Range of the XAxis. Since the Chart cannot define a punctual step of 1 month (the months has different number of days), the XAxis automatically defined that 30 days is the most appropriate.
    Setting a manual range won’t help you so I suggest that you use an XCategory instead of XValue:

    foreach(monthLedger month in year) 
       { 
        ser.Add(new DataPoint  
                {  
                    YValue = Convert.ToDouble(month.Revenue_Amount),  
                    Label = month.Revenue_Amount.ToString("0.00###"),  
                    XCategory = month.Full_Date
                }); 
       } 
    

    You can remove this – radChart1.DefaultView.ChartArea.AxisX.IsDateTime = true;
    as it is not needed any more.

    Cheers,
    Evgenia

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.