Achartengine图例位置 [英] Achartengine legend location
问题描述
有人知道如何更改图例的位置吗?我正在尝试扩展图形以利用所有空间.
Does anyone know how to change the location of the legend? I am trying to expand the graph to make use of all the space.
到目前为止,我有
mRenderer.setMargins(new int [] {20,30,-50,0});
mRenderer.setMargins(new int[] { 20, 30, -50, 0 });
这会将图形向下扩展,但图例仍在同一位置,因此现在位于x轴上方
This expands the graph lower but the legend stays in the same location so it is now above the x axis
我尝试了
mRenderer.setLegendHeight(5);
mRenderer.setLegendHeight(5);
带有负值和正值.我不确定该怎么做,但这会使我的图形在屏幕上偏低(将其变成可滚动的视图).
with both negative and positive values. I'm not sure what this is supposed to do but it makes my graph go wayyyy low on the the screen (turns it into a scrollable view).
也许并不重要,但这是一个片段,是XYChart类型.
Also, may not be important but this is in a fragment and is a XYChart type.
推荐答案
属性setLegendHeight(..)用于移动图例的位置.尝试更改在两个函数中使用的值,这将起作用.干杯.
The property setLegendHeight(..) moves the position of the legend. Try to change the values you are using in both functions, that would work. cheers.
哈里.
这篇关于Achartengine图例位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!