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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:48:16+00:00 2026-05-23T01:48:16+00:00

I have a chart that I use to display a graph. To display the

  • 0

I have a chart that I use to display a graph.

To display the chart I use a jar taken from here:

http://writerbay.wordpress.com/2011/03/12/android-tutorial-displaying-chart-on-android/#comment-54

And the code for it is also similar to that one….and it looks like this:

package com.google.android.chartView;

import com.kidroid.kichart.model.Aitem;    
import com.kidroid.kichart.view.LineView;    
import android.app.Activity;    
import android.graphics.Color;
import android.os.Bundle;

public class chartView extends Activity {
  /** Called when the activity is first created. */
  LineView lv;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    String xaxis[]=new String[4];
    xaxis[0]="2006";
    xaxis[1]="2007";
    xaxis[2]="2008";
    xaxis[3]="2009";
    float line1[]=new float[4];
    line1[0]=120;
    line1[1]=240;
    line1[2]=500;
    line1[3]=100;
    float line2[]=new float[4];
    line2[0]=100;
    line2[1]=650;
    line2[2]=700;
    line2[3]=300;
    float line3[]=new float[4];
    line3[0]=50;
    line3[1]=180;
    line3[2]=360;
    line3[3]=900;
    Aitem items[]=new Aitem[3];
    items[0]= new Aitem(Color.BLUE,"pauOut",line1);
    items[1]= new Aitem(Color.GREEN,"pauOut",line2);
    items[2]= new Aitem(Color.YELLOW,"pauOut",line3);
    lv=new LineView(this);
    lv.setTitle("Yearly Budget");
    lv.setAxisValueX(xaxis);
    lv.setItems(items);
    setContentView(lv);
  }
}

The problem I’m facing is that the chart fills entire my image and when I also wanna place a button on that activity it won’t get visible because the chart occupies the full screen….

Question: Is someone who could tell me how to place that chart in order for it not to fill my entire screen so I could place button underneath it??
Thx…My app is on android

  • 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-23T01:48:16+00:00Added an answer on May 23, 2026 at 1:48 am

    You’re calling setContentView on just the layout object you’ve created. So thats all that will be shown!

    Try using an xml file containing a blank linearlayout, and a button setup how you want it, and then in code, ThatLinearLayout.addView(lv);

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

Sidebar

Related Questions

I have some data similar to the following chart: http://developer.yahoo.com/yui/examples/charts/charts-seriescustomization_clean.html Only difference is that
I have a Java Db database table that I use to display results in
I use JFreeChart to display some simple data in a column chart. I have
I have a QTableWidget in my program that I use to display results and
I have heard that web-based chat clients tend to use networking frameworks such as
I have a line chart that is updated every so and so seconds, similar
I have a chart with a series that denotes a large set (1000's) of
I have a chart (in bitmap format) that I'm trying to render to a
I have some code that generates image of a pie chart. It's a general
I have an ASP.NET MVC Page that i have to display the fields in

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.