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

The Archive Base Latest Questions

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

I have a basic PageView model that tracks when a particular page is opened.

  • 0

I have a basic PageView model that tracks when a particular page is opened.

I want to display a graph of hits over time. I’m using flotilla for generating the graphs.

Now, I if I have a series of PageViews of a time period but I want to display a time period even if there are no PageViews flotilla seems to render a graphic that only encapsulates the time of the first and last PageView (not the min/max I want).

Here is my code:

chart("graph", { "Store 1" => { :collection => @store_one, :x => :date, :y => :sales }},:xaxis => {:mode=>"time", :min => @store_one.created_at,:max => Date.current})

But that date range is not rendered if the store is created on the same day as Date.current.

I’ve also tried :mode=>"date" and :mode=>"datetime" but no luck.

Any ideas?

  • 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-15T17:28:57+00:00Added an answer on May 15, 2026 at 5:28 pm

    Looking at flotila source I bet that :xaxis min, max options are not converted correctly. Flot seems to expect timestamps in milliseconds, you are passing in plain Date object which is just converted to json.

    Try this :xaxis => {:mode=>"time", :min => @store_one.created_at.to_time.to_i * 1000,:max => Date.current.to_time.to_i * 1000}

    Disclaimer: Never used flotila nor flot.

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

Sidebar

Related Questions

I have a basic PHP form (a few fields and 2 checkboxes, I want
I have a basic web service that returns the following object as JSON: public
I have some basic pageview incrementing code set up on a LAMP server (see
I have basic issue that i don't understand, we use HEAT to consume directory
I have basic stored procedure that performs a full text search against 3 columns
I have basic code that looks like this: while(inputfileStream.good()) { for(int i = 0;i<levels;i++)
I have basic function that prints network errors based on enum NetworkError. that looks
I have basic knowledge of javascript and jquery . I want to implement design
if I have basic model for keeping track of client art: class ArtEntry(models.Model): client
I have basic JavaScript code that needs to tell how many names out of

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.