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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:55:56+00:00 2026-05-15T23:55:56+00:00

I’m using a CartesianChart with a DateTimeAxis to display weekly data in a Flex

  • 0

I’m using a CartesianChart with a DateTimeAxis to display weekly data in a Flex application. When I set dataUnits=”weeks” and labelUnits=”weeks” on the DateTimeAxis, it automatically places each major tick on a Sunday. However, I would like to provide users with the option of beginning the week on a Sunday or a Monday. How can I ask the DateTimeAxis to instead place the major ticks on a Monday (or some other day of week)?

For example, if the user is looking at total sum of something over the week, and requests that weeks start on a Sunday, the Series data would look like:

x: Date(July 11, 2010)  y: 25
x: Date(July 18, 2010)  y: 30
x: Date(July 25, 2010)  y: 32
etc.

If the weeks start on a Monday, the Series data would instead look like:

x: Date(July 12, 2010)  y: 22
x: Date(July 19, 2010)  y: 33
x: Date(July 26, 2010)  y: 29
etc.

With the second data set, the major ticks are still on July 11, July 18, July 25, etc. but the bars are slightly shifted off-center from the major ticks.

Thanks!

  • 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-15T23:55:57+00:00Added an answer on May 15, 2026 at 11:55 pm

    I looked at the code of DateTimeAxis class and I’m almost sure you can’t do what you want. If “alignLabelsToUnits” property is set to true (default) then labels are created by rounding Series data dates to appropriate units. In your case (weeks) it looks like this:

    case "weeks":
        d[hoursP] = 0;
        d[minutesP] = 0;
        d[secondsP] = 0;
        d[millisecondsP] = 0;
        if (d[dayP] != 0)
            d[dateP] = d[dateP] + (7 - d[dayP]);
        break;

    So as you can see, it checks if processed date is first day of the week (hard-coded 0), and if it is not, it’s changed to be such.
    To achieve the behavior you seek, you’d probably have to override function for label creation and write another one for date rounding, as the default rounding function is declared private.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.