GithubHelp home page GithubHelp logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
you can save the view as a bitmap:
if( false == view.isDrawingCacheEnabled()){
   view.setDrawingCacheEnabled(true);
}
Bitmap bitmap = content.getDrawingCache();

Original comment by [email protected] on 21 Apr 2011 at 8:29

from achartengine.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Can you provide an example of this ? , I can't see how I can access the bitmap 
without doing a custom mod of achartengine

Original comment by [email protected] on 18 May 2011 at 9:58

from achartengine.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Fixed in SVN rev. r188.
Added GraphicalView.toBitmap()

Original comment by [email protected] on 19 May 2011 at 5:34

  • Changed state: Fixed

from achartengine.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
I am not able to save pie chart as bitmap then to image file.
Can you help?

here is may code
GraphicalView gview = execute(this);
if (false == gview.isDrawingCacheEnabled()) {
    gview.setDrawingCacheEnabled(true);         
}


Bitmap img = gview.getDrawingCache(); //gets NULL !!!



try {
    FileOutputStream out = new FileOutputStream(getApplicationContext().getFilesDir() + "/pie.jpeg");
    img.compress(Bitmap.CompressFormat.JPEG, 97, out);
    out.close();
} catch (Exception e) {
e.printStackTrace();
}

public GraphicalView execute(Context context) {
double[] values = new double[] { 12, 14, 11, 10, 19 };
int[] colors = new int[] { Color.BLUE, Color.GREEN, Color.MAGENTA, 
Color.YELLOW, Color.CYAN };
DefaultRenderer renderer = buildCategoryRenderer(colors);
renderer.setLabelsTextSize(14);
GraphicalView gview = ChartFactory.getPieChartView(context, 
buildCategoryDataset("Project budget", values), renderer);
return gview;
}

Original comment by [email protected] on 29 Jun 2011 at 11:58

from achartengine.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Did you add the needed permission for that?

Original comment by [email protected] on 29 Jun 2011 at 3:46

from achartengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.