Comments (16)
Hi, I'll check it. Can you tell me on which device you experienced this error?
from hellocharts-android.
Thanks lecho. You're so fast!
I experienced it on a Galaxy Note 3
from hellocharts-android.
Now it might take a while, I will try to reproduce it. One more question, do the error occurs when you rotate device or switching between activities?
from hellocharts-android.
It happends when i switch between activities.
My app is only in portrait mode.
from hellocharts-android.
But, in general, is there a function to call in onStop() or onDestroy() methods of fragments/activities when we use hellocharts to free some memory or anything else?
from hellocharts-android.
No, there is no method for that.
from hellocharts-android.
Lecho, I have a question concerning this problem.
I'll try to be understandable :-)
My app is using the 1.3 JAR version of hellocharts.
So, I gave a look at the source code of the Release of this 1.3 version at the line number 93 concerned by this problem in my error log :
"lecho.lib.hellocharts.renderer.LineChartRenderer.initDataMeasuremetns(LineChartRenderer.java:93)"
And I realized that in the 1.3 source, the line 93 don't correspond to this function (initDataMeasuremetns()) but it corresponds to the line of the 1.1 version of Release source code of this library...!
So it seems that the 1.3 JAR file of the hellocharts library (that i downloaded here at Release 1.3 Section : https://github.com/lecho/hellocharts-android/releases) has been generated with 1.1 source code...
Am I Right?
from hellocharts-android.
Hmm, I'm not sure but it looks like error log is correct, it points to line within initDataMeasurements()
method when LineChartRenderer creates new bitmap
LineChartRenderer.java:93 at tag v1.3
For version 1.1 line 93 points to setting bitmap to canvas, that should not cause problems with memory.
LineChartRenderer.java:93 at tag v1.1
from hellocharts-android.
Yes, but on your first link ( LineChartRenderer.java:93 at tag v1.3 ) the corresponding manifest indicates 1.1 version.... not 1.3...
from hellocharts-android.
O, yes, looks like I forgot to change version number:/ But source code should be Ok.
I decompiled jar for version 1.3(in JD-GUI), it's ok, the same as for tag v1.3.
from hellocharts-android.
Ok thanks, so the problem is really due to createBitmap() function.
Just for information, in my Fragments, i add the chart programmatically (with addView) but not in XML UI file.
So, I add it in a Linear Layout which is defined in the XML file.
from hellocharts-android.
This problem appears on Samsung Galaxy s4, too
from hellocharts-android.
I replaced the backgrounds image (which had yet low resolution) of the fragments which contains charts by simple color backgrounds (no images but just color).
I have the impression that the problem has disappeared...
Maybe my background images filled too much memory (even if their resolutions were very low)....
So, it seems to be better...
from hellocharts-android.
I'll wait some hours before close this post, to be sure the problem is really solved
from hellocharts-android.
Ok, check with memory monitor if heap usage stays on the same level when you switch between activities.
from hellocharts-android.
Thanks a lot for your help and congratulations for your work on this lib.
Regards
from hellocharts-android.
Related Issues (20)
- y axis value only shows three digits. i.e, 0,300,600,900,200,500,800,100 etc. I need to show it as 0,300,600,900,1200,1500,1800,2100 HOT 1
- groovy.lang.MissingPropertyException: Could not set unknown property 'name' for object of type org.gradle.api.publish.maven.internal.publication.DefaultMavenPom.
- How to change Background Color Label?
- setCurrentViewport different result on Run and ApplyChanges
- Hellocharts android library not rendering chart when there is a single value or when y axis values are same HOT 2
- "setHasGradientToTransparent" Are Missing on LineChart with Kotlin HOT 3
- How to set axis number to Text in column chart? HOT 1
- Cannot use line.setHasGradientToTransparent() method
- Is it possible to obtain values from the generated graph?
- Importing it as Module
- linechart with multicolor data line
- Compatibility with AndroidX HOT 1
- Horizontal spacing between points
- 关于一个点问题(已解决)
- About the problem that the y-axis is not displayed.
- Unsupported Modules Detected
- HelloCharts
- library configuration
- LineChartView can not make steps of 0.5f
- 垂直折线图
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hellocharts-android.