删除系列指示灯/图例AndroidPlot [英] Remove series indicator/plot legend AndroidPlot
问题描述
我知道AndroidPlot有一个论坛,但它不是最活跃的,所以我会在这里偶然我的胳膊......
I realise AndroidPlot has a forum but it isn't the most active so i'll chance my arm here...
我试图删除使用AndroidPlot库我的XY坐标图的一系列指示或图例。我不想从情节本身删除系列,只是传说。
I'm trying to remove the series indicator or plot legend from my XY plot using the AndroidPlot library. I don't want to remove the series from the plot itself, just the legend.
我已经看到了它做在AndroidPlot例子,但在有限的文档,这是很难找到的方法做的东西,如删除legen
I've seen it done on AndroidPlot examples but with the limited documentation it's difficult to find methods to do the stuff like remove the legen
推荐答案
确定我有以下的code做到这一点。这不是在最新版本的测试,但希望还是不错的。
OK I have the following code to do this. This is not tested on the very latest version but hopefully is still good.
if (!mKeyOn)
mDynamicPlot.getLayoutManager()
.remove(mDynamicPlot.getLegendWidget());
if (!mDomainLabelOn)
mDynamicPlot.getLayoutManager().remove(
mDynamicPlot.getDomainLabelWidget());
看起来,关键是要得到的layoutManager。
Looks like the trick is to get the layoutManager.
这篇关于删除系列指示灯/图例AndroidPlot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!