How to enable cubic lines in MPAndroidChart library?

て烟熏妆下的殇ゞ 提交于 2019-12-23 08:19:29

问题


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.


回答1:


Try using something like this

lineDataSet.setDrawCubic(true);

It worked for me, here lineDataSet is your LineDataSet instance.

Update for v3.0.0 and onwards:

lineDataSet.setMode(LineDataSet.Mode.CUBIC_BEZIER);


来源:https://stackoverflow.com/questions/38892685/how-to-enable-cubic-lines-in-mpandroidchart-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!