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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:56:50+00:00 2026-06-03T07:56:50+00:00

I have line chart, using achartengine library. In x axis there are Dates. I

  • 0

I have line chart, using achartengine library. In x axis there are Dates. I need to set minimal viewable date. How to do that if x axis is made from Date objects and setPanLimits takes double value?

    Date minDate = new GregorianCalendar(2008, 1, 01).getTime();
    Date maxDate = new GregorianCalendar(2008, 1, 30).getTime();
    // mRenderer.setPanLimits(new double[] { minX, maxX, minY, maxY});
    mRenderer.setPanLimits(new double[] { minX, maxX, 0, 1000});
    mRenderer.setZoomLimits(new double[] { minXe, maxX, 0, 1000 });

If I set minimal x axis as 0, then can’t move x axis at all, but shows all x values in view. I need to set little bit smaller x for min and little bit bigger x for max, so can move chart a little to left and right

I found about that 3 days is private static final double THREEDAYS = 81300000 *3;, but how about conversion from Date to that double, so I can substract to get minX?

I hope you will understand my question. 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-06-03T07:56:52+00:00Added an answer on June 3, 2026 at 7:56 am

    This extends viewport to 3 days

    double THREEDAYS = 81300000 *3;
    double minX = minDate.getTime() - THREEDAYS;
    double maxX = maxDate.getTime() + THREEDAYS;
    

    Hope this will help to others

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

Sidebar

Related Questions

I have created a line chart using Reporting Services that charts the number of
I have create simple line chart using Android Plot library. what i want to
I am using below URL to show line chart but one thing I have
I'm using Visifire. I have plotted about 500+ points on a line chart. However,
I have a line chart that is updated every so and so seconds, similar
For example we have this line chart at Google Code API there is a
I would like to have a step line chart like this one, using D3
I've created an ajax driven flot line chart that I would like to have
I have a line chart in a report (rdlc), that I cannot get formatted
I am using gRaphael JS lib to draw line chart. and have some problem

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.