Search code examples
androidgraphachartengine

achartengine zoom and black border


I'm adding graphics to my application using achartengine but I have some doubts. Is there any way to remove the black frame that surrounds the chart and put it transparent? is that right now the bottom of the chart if I have the edge transparent but not how to set it. The other question is, how I can set a zoom into a graph?, as it will always appear that bars certain (in my case 3).

Thank you very much.


Solution

  • You can set the color of the chart margins:

    mRenderer.setMarginsColor(color);
    

    You can hide the margins by calling:

    mRenderer.setMargins(new double[] {0, 0, 0, 0});
    

    You can also hide the legend:

    mRenderer.setShowLegend(false);
    

    Pinch zoom is enabled by default. In order to enable the zoom buttons:

    mRenderer.setZoomButtonsVisible(true);
    

    I don't understand your last sentence. Please create another question with details.