Search code examples
androidachartengine

customized names on x-axis on achart engine


i am new to android app development. i am using a-chart engine to dynamically generate a graph, my Question is can we place custom names on the x-axis, i,e can we place country names instead of values such as 10,20,30 etc


Solution

  • Of course it is possible, you have to set custom x axis labels:

    renderer.addXTextLabel(x, text);
    

    To remove the default values call

    renderer.setXLabels(0);
    renderer.setYLabels(0);
    

    Make sure you are using ACE 1.0.0.