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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:24:00+00:00 2026-06-18T09:24:00+00:00

I have a dataset with pairs {x: someValue, y: count} where someValue is a

  • 0

I have a dataset with pairs {x: someValue, y: count} where someValue is a day of the week in a form of (1..7) where 1 is “Sunday”.
On the Ricskshaw chart I would like to display (Mon, Tue..etc) respectively on the X-axis. How do I do that?

At the moment I have done:

var ticksTreatment = 'glow';
var xAxisQPerDay = new Rickshaw.Graph.Axis.Time( {
          graph: graphQPerDay,
          ticksTreatment: ticksTreatment
      } );
xAxisQPerDay.render();

but this gives me, of course, the default values 1s, 2s, 3s etc…

  • 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-18T09:24:01+00:00Added an answer on June 18, 2026 at 9:24 am

    Something like this should work:

    var xAxisQPerDay = new Rickshaw.Graph.Axis.X({
        graph: graphQPerDay,
        tickFormat: function(x) {
            switch (x) {
                case 1: return 'Mon';
                case 2: return 'Tue';
                case 3: return 'Wed';
                case 4: return 'Thu';
                case 5: return 'Fri';
                case 6: return 'Sat';
                case 7: return 'Sun';
            }
        }
    });
    
    xAxisQPerDay.render();
    

    A more dynamic approach if you have built a map on the side to cache the field data.

    var days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
    var xAxisQPerDay = new Rickshaw.Graph.Axis.X({
        graph: graphQPerDay,
        tickFormat: function(x) {
            return days[x];
        }
    });
    
    xAxisQPerDay.render();
    

    OR

    var days = { 0: 'Mon', 1: 'Tue', 2: 'Wed', 3: 'Thu', 4: 'Fri', 5: 'Sat', 6: 'Sun' };
    var xAxisQPerDay = new Rickshaw.Graph.Axis.X({
        graph: graphQPerDay,
        tickFormat: function(x) {
            return days[x];
        }
    });
    
    xAxisQPerDay.render();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to average pairs of columns in a data set, not with
I have a file containing unique pairs of proteins, the positive dataset. Let's call
I have a dataset of state->action pairs, (s,a), where each s defines a probability
I have a large dataset that looks like this: 5 6 5 6 3
I have a dataset (in the form of a file) composed of lines of
I have a dataset that I want to display as a pair of histograms/barcharts.
I have a dataset of approximately 100,000 (X, Y) pairs representing points in 2D
I have DataSet which has 3 columns. Name - insurance comp. name - treatmentDate
I have a dataset with ~20M rows and I'm observing the following behavior. The
I have a DataSet , where in the first table and in the row

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.