linheimx / lchart Goto Github PK
View Code? Open in Web Editor NEWSimple & useful chart for Android
License: Apache License 2.0
Simple & useful chart for Android
License: Apache License 2.0
错误提示:
java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.createBitmap(Bitmap.java:829)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
at com.linheimx.app.library.render.LineRender.onChartSizeChanged(LineRender.java:60)
at com.linheimx.app.library.charts.LineChart.onSizeChanged(LineChart.java:224)
at android.view.View.sizeChange(View.java:17187)
at android.view.View.setFrame(View.java:17149)
at android.view.View.layout(View.java:17040)
错误定位是在 LineRender.java类中的
public void onChartSizeChanged(int w, int h) {
_drawBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
softwareCanvas.setBitmap(_drawBitmap);
}
原因大概是 传入给Bitmap参数前,进行下width、height的判断,必须大于0。
这个问题一般不会出现,只是我的布局比较特殊所以会出现错误。
修改后
public void onChartSizeChanged(int w, int h) {
if (w>0&&h>0){
_drawBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
softwareCanvas.setBitmap(_drawBitmap);
}
}
以上意见仅供参考!
Want to add a note next to each point.
怎么去改变轴坐标的字体颜色,大小,初始是蓝色
还有能修改轴文字类型吗,譬如12修改成12个月(double-》》String)
有相关的设计图吗,用例图流程图之类的,方面新手深入了解
如果margin的话,倒是从margin的位置可以滑动
sir how to make yAxis with String Values?
假如有一组10个点的(x,y),其中有个点的y值为null,代表曲线在此处断开,接着下个有值的点继续绘制
比如,我想0.5秒完成横向的动画效果展示。
您这个项目的单位显示是怎么弄的,初始的单位是最小单位吗?我给添加了50条数据,数据就挤在一块成了一条棍,但是x轴的显示还是5个单位,怎么让直接显示最小的单位,只让他能滑动,不去缩放呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.