Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

折线图如果只有一条数据的话程序会崩溃 #63

Open
victorjiang-zz opened this issue Apr 16, 2018 · 1 comment
Open

折线图如果只有一条数据的话程序会崩溃 #63

victorjiang-zz opened this issue Apr 16, 2018 · 1 comment

Comments

@victorjiang-zz
Copy link

JHLineChart 折线图,如果只有一条数据,程序奔溃,在某些计算的方法中,如:
_perXLen = (_xLength-kXandYSpaceForSuperView)/(_xLineDataArr.count-1);

因为只有一条数据,_xLineDataArr.count = 1,所以分母为0,计算出_perXLen 为非法数值

@meilulu
Copy link

meilulu commented Dec 29, 2018

所以必须有两条数据,自己做个判断好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants