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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:03:34+00:00 2026-05-28T04:03:34+00:00

Hi Android developers, Currently i am working on one Financial based chart application, and

  • 0

Hi Android developers,
Currently i am working on one Financial based chart application, and i draw the chart with the help of jjoe64 blog. but now i am going to implement real time chart. for example chart is draw automatically in the surface each and every second or a min once made changes in server side. can any one implement these kind of task. please help me regarding this.

  • 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-28T04:03:35+00:00Added an answer on May 28, 2026 at 4:03 am

    Ok, I strongly recommend to use AChartEngine. It is free, lightweight and supports many types of charts pie, graph etc. As about to dynamically update the chart i achieved this by adding values in a separate thread.Here is my example,it is nothing fancy:

    package my.pack;
    
    import java.util.Date;
    import java.util.Random;
    
    import org.achartengine.ChartFactory;
    import org.achartengine.GraphicalView;
    import org.achartengine.chart.PointStyle;
    import org.achartengine.model.TimeSeries;
    import org.achartengine.model.XYMultipleSeriesDataset;
    import org.achartengine.renderer.XYMultipleSeriesRenderer;
    import org.achartengine.renderer.XYSeriesRenderer;
    
    import android.app.Activity;
    import android.graphics.Color;
    import android.os.Bundle;
    
     public class ChartsActivity extends Activity {
    
    private static Random random = new Random();
    
    private static TimeSeries timeSeries;
    private static XYMultipleSeriesDataset dataset;
    private static XYMultipleSeriesRenderer renderer;
    private static XYSeriesRenderer rendererSeries;
    private static GraphicalView view;
    private static Thread mThread;
    
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);     
    
        dataset = new XYMultipleSeriesDataset();
    
        renderer = new XYMultipleSeriesRenderer();
        renderer.setAxesColor(Color.BLUE);
        renderer.setAxisTitleTextSize(16);
        renderer.setChartTitle("Time");
        renderer.setChartTitleTextSize(15);
        renderer.setFitLegend(true);
        renderer.setGridColor(Color.LTGRAY);
        renderer.setPanEnabled(true, true);
        renderer.setPointSize(10);
        renderer.setXTitle("Time");
        renderer.setYTitle("Number");
        renderer.setMargins( new int []{20, 30, 15, 0});
        renderer.setZoomButtonsVisible(true);
        renderer.setBarSpacing(10);
        renderer.setShowGrid(true);
    
    
        rendererSeries = new XYSeriesRenderer();
        rendererSeries.setColor(Color.RED);
        renderer.addSeriesRenderer(rendererSeries);
        rendererSeries.setFillPoints(true);
        rendererSeries.setPointStyle(PointStyle.CIRCLE);
    
        timeSeries = new TimeSeries("Random");
        mThread = new Thread(){
            public void run(){
                while(true){
                try {
                    Thread.sleep(2000L);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                    timeSeries.add(new Date(), random.nextInt(10));
                    view.repaint();
                }
            }
        };
        mThread.start();
    }
    
    @Override
    protected void onStart() {
        super.onStart();
        dataset.addSeries(timeSeries);
        view = ChartFactory.getTimeChartView(this, dataset, renderer, "Test");
        view.refreshDrawableState();
        view.repaint();
        setContentView(view);    
    }
    
    }
    

    Add your own values to the thread.You may want to take a look on how to use the AChartEngine library.
    Happy coding!

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

Sidebar

Related Questions

Currently a team of developers is working on Android application and during the development
I am a new android developer. Currently I am working on an application which
Any android developers had any success changing the package name of your application (in
I am working on designing an Android application, and I have several questions I
I am a new android developer and I am currently making an application to
I have searched through Google, SO and Android developers but I need some further
I am a new developer in Android. Currently I have started working on an
I asked a similar question in the android developers group but haven't received a
I'm developing an android application. I want to create animation with imageviews . Currently,
I am currently working on an Android App that needs several overlapping SurfaceViews 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.