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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:07:37+00:00 2026-06-13T13:07:37+00:00

Looking for a basic AndroidPlot bar graph example. A few people have contacted the

  • 0

Looking for a basic “AndroidPlot” bar graph example.

A few people have contacted the developer via the site forum but he mentions he is still working on that tutorial.

However, he does link to a more in depth example to look at for now.

The problem is I can’t figure out which parts render the bar graph vs. the other functionality, as I am obviously not familiar with the more complex parts of the library.

Can any one please help me with a basic structure of code for a bar graph, using AndroidPlot please?

Thank you.

  • 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-13T13:07:38+00:00Added an answer on June 13, 2026 at 1:07 pm

    I got it working like this with AChartEngine (setup, I use one renderer, with one dataset, it is an active changeing graph):

    LinearLayout layout = (LinearLayout)findViewById(R.id.chart);
    
    // setup dataset and renderer
    dataset = new XYMultipleSeriesDataset();
    renderer = new XYMultipleSeriesRenderer();
    
    // configure renderer
    renderer.setZoomEnabled(false, false);
    renderer.setPanEnabled(false, false);
    renderer.setYAxisMax(90);
    renderer.setYAxisMin(0);
    renderer.setXAxisMin(-1);
    renderer.setBarSpacing(0.5);
    renderer.setShowLegend(false);
    renderer.setXLabels(0);             // hides the default labels
    renderer.setLabelsTextSize(15);
    
    // create chart
    mChartView = ChartFactory.getBarChartView(this, dataset, renderer, BarChart.Type.DEFAULT);
    layout.addView(mChartView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    
    // add some data, so the chart shows
    XYSeriesRenderer r = new XYSeriesRenderer();
    r.setColor(Color.rgb(192, 192, 192));
    renderer.addSeriesRenderer(r);
    XYSeries c = new XYSeries("");
    c.add(0,0);
    dataset.addSeries(c);
    

    Then later, render it again to liven it up (note I ripped some parts from my own code, it might not be complete):

    // remove any bars that already exist
    if (theAct.dataset.getSeriesCount() > 0) {
        theAct.dataset.removeSeries(0);
    }
    
    XYSeries c = new XYSeries("");
    
    // for some reason, the bar is very narrow, when only one bar is shown,
    // when we use a negative spacing, the bar will be bigger
    // i is the number of bars
    if (i == 1) {
        theAct.renderer.setBarSpacing(-0.8);
    } else {
        theAct.renderer.setBarSpacing(0.5);
    }
    
    // finish up and render!
    theAct.renderer.setXAxisMax(i);
    theAct.dataset.addSeries(c);
    theAct.mChartView.zoomReset();
    theAct.mChartView.repaint();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking to graph basic database data in a X Y axis graph. I
I have been looking for very basic keyword driven test..i do not understand well
I have come across something very similar to the following when looking for basic,
I'm not really looking for a basic SQL guide but just something specific to
I am working on a site, and I am looking for basic profile icons
Has anyone here extended LEON3 softcore with custom hw? I'm looking for basic example
i am looking for a basic example that shows how i could call a
Just looking for the first step basic solution here that keeps the honest people
I am looking for a basic example of HTML5 <canvas> animation. For example, making
I'm looking for some sort of very basic privilege escalation example that I can

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.