在Graph中的mpAndroidChart中隐藏图例(Hide legends in mpAndroidChart in Graph)

编程入门 行业动态 更新时间:2024-10-24 08:23:38
在Graph中的mpAndroidChart中隐藏图例(Hide legends in mpAndroidChart in Graph)

我已经尝试了所有,但没有找到任何代码隐藏图片中的mpAndroidChart传说。

chart.setTouchEnabled(false); chart.animateY(3000); chart.setDescription(""); chart.setDrawValueAboveBar(false); chart.getAxisLeft().setDrawLabels(false); //chart.getAxisRight().setDrawLabels(false); //chart.getXAxis().setDrawLabels(false); chart.setDrawBorders(true); //chart.getAxisLeft().setDrawGridLines(false); //chart.getXAxis().setDrawGridLines(false); //chart.getAxisRight().setDrawGridLines(false);

I have tried all but didn't find any code for hiding legends in mpAndroidChart in Graph.

chart.setTouchEnabled(false); chart.animateY(3000); chart.setDescription(""); chart.setDrawValueAboveBar(false); chart.getAxisLeft().setDrawLabels(false); //chart.getAxisRight().setDrawLabels(false); //chart.getXAxis().setDrawLabels(false); chart.setDrawBorders(true); //chart.getAxisLeft().setDrawGridLines(false); //chart.getXAxis().setDrawGridLines(false); //chart.getAxisRight().setDrawGridLines(false);

最满意答案

首先使用方法get legend()然后使用方法set Enabled(),因为它是布尔方法传递TRUE / FALSE。

First use method get legend() And then use method set Enabled () ,as it is boolean method pass TRUE/FALSE .

更多推荐

本文发布于:2023-08-05 09:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1431142.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图例   mpAndroidChart   Graph   Hide   legends

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!