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

  • Home
  • SEARCH
  • 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 7716987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:46:13+00:00 2026-06-01T02:46:13+00:00

Actually, in my app, I have created a graph using achartEngine . In these

  • 0

Actually, in my app, I have created a graph using achartEngine. In these in the x-axis initially, I am displaying value from 1 to 31. Now instead of displaying this is it possible to display values like 1-03-2012, 2-03-2012, 3-03-2012 … and so on up to last day current month and when it reaches last day of current month i.e. 31-03-2012 the value display after that should be
1-04-2012 2-04-2012…and so on. The code I have used while displaying value like 1 2 3 4 5… is given below. Can anyone help me to solve this out?

code for graph

 renderer = new XYMultipleSeriesRenderer(2);        
    int length = colors.length;     
    for (int i = 0; i < length; i++) 
    {
        XYSeriesRenderer r = new XYSeriesRenderer();
        r.setColor(colors[i]);
        r.setPointStyle(styles[i]);
        renderer.addSeriesRenderer(r);
    }
    
    int rendererLength = renderer.getSeriesRendererCount();
    for (int i = 0; i < rendererLength; i++) 
    {
      ((XYSeriesRenderer) renderer.getSeriesRendererAt(i)).setFillPoints(true);
    }               
    renderer.setAxisTitleTextSize(12);
    renderer.setChartTitleTextSize(12);
    renderer.setLabelsTextSize(10);
    renderer.setLegendTextSize(12);
    renderer.setPointSize(5f);
    
    renderer.setApplyBackgroundColor(true);
    renderer.setBackgroundColor(Color.parseColor("#F5F5F5"));
    renderer.setMarginsColor(Color.parseColor("#F5F5F5"));
    
    renderer.setChartTitle("Weight / Temperature");
    renderer.setXLabels(20);
    renderer.setXTitle(sdFormatter.format(currentDate));        
    renderer.setXAxisMin(1);
    renderer.setXAxisMax(nMaxDay);
    renderer.setXLabelsAlign(Align.CENTER);
                
    renderer.setYLabels(10);  
    renderer.setYTitle("Weight", 0);
    renderer.setYTitle("Temperature", 1);
    renderer.setYAxisMin(10, 0);
    renderer.setYAxisMax(90, 0);
    renderer.setYAxisMin(10, 1);
    renderer.setYAxisMax(90, 1);
    renderer.setYAxisAlign(Align.LEFT, 0);
    renderer.setYAxisAlign(Align.RIGHT, 1);
    renderer.setYLabelsAlign(Align.LEFT, 0);
    renderer.setYLabelsAlign(Align.RIGHT, 1);
    
    renderer.setAxesColor(Color.LTGRAY);
    renderer.setLabelsColor(Color.parseColor("#5f5f5f"));          
    renderer.setShowGrid(true);
    renderer.setGridColor(Color.GRAY);

screenshot shot
enter image description here

  • 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-01T02:46:15+00:00Added an answer on June 1, 2026 at 2:46 am

    Use AverageTemperatureChart class from the Demo.

    setChartSettings(renderer, "Average temperature", "Month", "Temperature", 0.5, 5.5, 0, 4,
            Color.LTGRAY, Color.LTGRAY);
    

    then change like this and check the changes

     for (int i = 0; i < titles.length; i++) 
        {
          x.add(new double[] { 1, 2, 3, 4 });
           }
    

    add four just for demo

    And add label through renderer.addTextLabel();

    ex:

    String[] date={"1-3-2012","1-4-2012","1-5-2012","1-6-2012"}; 
    for (int i = 0; i < date.length; i++) 
        { 
    
        renderer.addTextLabel(i+1, date[i]);
        }
        renderer.setXLabelsAlign(Align.CENTER);
        renderer.setXLabels(0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually i have created an app from which i can stored notes to my
Actually i am get stuck in a big problem..I have created an app from
I have created a UITableView in an app, using the basis of a tutorial
I actually have two questions regarding exception/error handling in the iPhone app that I
I have a WPF application that is a fullscreen kiosk app. It's actually a
I m Using a calendar.js file to implement calendar in my App. Actually this
Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest
I have created a simple map app that shows the local garage sales in
We have a partner that is actually owning our app on it's iTunes Connect
I'm attempting to move a web app we have (written in Perl) from an

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.