问题
Am trying out some graphs in an Android App with AChartEngine (version 1.2.0). I want to hide the tick marks in the axes (i.e. the small lines at each label displayed on the axes). I have marked two of them in red-colored-boxes in the screenshot below:
how do I do it? Can someone please help? I read here (https://code.google.com/p/achartengine/issues/detail?id=336) that there is a multirenderer.setShowTickMarks(false); method. But am not getting to see that method in the XYMultipleSeries renderer API ( http://www.achartengine.org/content/javadoc/org/achartengine/renderer/XYMultipleSeriesRenderer.html ) on the Web, nor is that method recognized as defined in the IDE when I type it.
回答1:
What you have to do is:
mSetRenderer.setXLabels(0);
for(int i=0;i<=14;i++)
{
if(i==4 || i==5)
{
// Do nothing(this will prevent to show ticks on 4th and 5th Value of X axis)
}
else
{
mSetRenderer.addXTextLabel(i,String.valueOf(i));
}
}
来源:https://stackoverflow.com/questions/23856440/android-achartengine-hide-tick-marks-in-axes