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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:16:30+00:00 2026-06-09T08:16:30+00:00

I have created in my application pie chart using AChartEngine. I have written it

  • 0

I have created in my application pie chart using AChartEngine. I have written it in this way:

private GraphicalView graphicalView;    
private CategorySeries categorySeries = new CategorySeries("");
private DefaultRenderer defaultRenderer = new DefaultRenderer();

private void setUpPieCharts() {
    defaultRenderer.setApplyBackgroundColor(true);
    defaultRenderer.setBackgroundColor(Color.TRANSPARENT);
    defaultRenderer.setZoomButtonsVisible(false);
    defaultRenderer.setZoomEnabled(false);
    defaultRenderer.setPanEnabled(false);
    defaultRenderer.setStartAngle(130);
    defaultRenderer.setShowLabels(false);
    defaultRenderer.setShowLegend(false);

     categorySeries.add("Series " + (categorySeries.getItemCount() + 1), 150);
     SimpleSeriesRenderer renderer = new SimpleSeriesRenderer();
     renderer.setColor(COLORS[(categorySeries.getItemCount() - 1) % COLORS.length]);
     defaultRenderer.addSeriesRenderer(renderer);

     categorySeries.add("Series " + (categorySeries.getItemCount() + 1), 50);
     renderer = new SimpleSeriesRenderer();
     renderer.setColor(COLORS[(categorySeries.getItemCount() - 1) % COLORS.length]);
     defaultRenderer.addSeriesRenderer(renderer);

     LinearLayout layout = (LinearLayout) findViewById(R.id.chart_1);
     graphicalView = ChartFactory.getPieChartView(this, categorySeries, defaultRenderer);
     //defaultRenderer.setStartAngle(90);           
     layout.addView(graphicalView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
}

It works quite good. But setStartAngle() method seems to be not working. I have tried with few values but my pie chart still looks the same. What am I doing wrong?

EDIT

Screenshot with calling this method.

Screenshot without calling method

I have uploaded two screenshots with calling and without calling this method. For convenience I have added also this line for my activity:

Toast.makeText(getApplicationContext(), String.valueOf(defaultRenderer.getStartAngle()), Toast.LENGTH_LONG).show();

Pie chart still looks the same.

  • 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-09T08:16:32+00:00Added an answer on June 9, 2026 at 8:16 am

    It seems like your code is calling the setStartAngle twice, once with 130 and another time with 90. I think it will always display with start angle = 90.

    I have just tried it in the ACE demo application and it works.

    OK, I finally managed to see where the issue is. You are running on AChartEngine 1.0.0 which was released in March. The start angle API was there, but it was not working for PieChart and this was fixed in May: http://code.google.com/p/achartengine/source/detail?r=386

    In order to have it work, you will have to checkout the AChartEngine code and do a build yourself by running ant dist

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

Sidebar

Related Questions

I have created Windows Application. In this, I have multiple tables in dataset, now
I have created an application using Adobe Flex. I took all the files from
i have created application using layout font sizes in pixels font and other layout
I have created application installer using Wix. I have a ProgressBar control present on
I have created application and deployed it using ClickOnce it size is about 30MB,
I have created application using TSQL and libraries. Right now I am generating clients
I have created a application for using the libtorrent. In that I am using
I have created application using: Default Web Site >> Right Click >> Add Application
I have created an application using Netbeans 6.9. In the application I want that
I have created application in Facebook. By using Facebook Javascript SDk, I posted message

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.