Android achartengine文本标签边距和填充
各位开发人员,我有一个问题:如何缩小标签和条之间的间距,我已尝试将XYMultipleSeriesRenderer的边距设置为不同的正负范围,但这不会影响标签和条之间的间距。此外,将负值传递到renderer.setxlabeladding似乎被忽略-文本标签位于X轴上,因为图形旋转了90% 我正在使用Achartengine1.1.0,它应该是最新的 下面是我用来操纵外观的代码部分:Android achartengine文本标签边距和填充,android,margin,padding,achartengine,Android,Margin,Padding,Achartengine,各位开发人员,我有一个问题:如何缩小标签和条之间的间距,我已尝试将XYMultipleSeriesRenderer的边距设置为不同的正负范围,但这不会影响标签和条之间的间距。此外,将负值传递到renderer.setxlabeladding似乎被忽略-文本标签位于X轴上,因为图形旋转了90% 我正在使用Achartengine1.1.0,它应该是最新的 下面是我用来操纵外观的代码部分: renderer.setOrientation(Orientation.VERTICAL); //ho
renderer.setOrientation(Orientation.VERTICAL); //horizontal bar-graph
renderer.clearXTextLabels();
renderer.setYLabels(0); //remove units on the Y axis(the horizontal axis since the graph has been rotated 90 degree)
renderer.setXLabels(0); //removes 'values' from the X-Axis
renderer.setMargins(new int[]{10, 0, 90, 0}); //top, left, bottom, right. Since its a horizontal bar graph, the margins has been rotated clock-wise. setting them to negative doesn't solve my problem.
renderer.addXTextLabel(0.9, "Average");
renderer.addXTextLabel(1.2, "Maximum");
renderer.setXLabelsPadding(-200f); //no effect
renderer.setYLabelsPadding(-200f); //no effect
尝试render.setBarSpacingfloat;用于钢筋之间的间距。我用了这个,它成功了。你有什么解决方案吗?没有,我的最终解决方案是创建我自己的条形图库。