如何在MPAndroidChart库中启用三次线? [英] How to enable cubic lines in MPAndroidChart library?
本文介绍了如何在MPAndroidChart库中启用三次线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将 MPAndroidChart 库用于我的项目,以将图表集成到我的应用程序中.我知道如何使用LineCharts,但我想不出一种使用LineCharts的三次线功能的方法.下图显示了我想要的图形,请让我知道如何解决此问题.
I am using MPAndroidChart library for a project of mine to integrate charts in my app. I know how to use LineCharts but I couldn't figure out a way to use the Cubic Lines feature of the LineCharts. The image below shows the kind of graph i want, please let me know how to solve this issue.
推荐答案
尝试使用类似的方法
lineDataSet.setDrawCubic(true);
它对我有用,这里的lineDataSet是您的LineDataSet
实例.
It worked for me, here lineDataSet is your LineDataSet
instance.
更新(针对v3.0.0及更高版本):
Update for v3.0.0 and onwards:
lineDataSet.setMode(LineDataSet.Mode.CUBIC_BEZIER);
这篇关于如何在MPAndroidChart库中启用三次线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文