paragp / achartengine

AChartEngine is a charting library for Android applications. It currently supports the following chart types: line chart area chart scatter chart time chart bar chart pie chart bubble chart doughnut chart range (high-low) bar chart dial chart / gauge combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart cubic line chart All the above supported chart types can contain multiple series, can be displayed with the X axis horizontally (default) or vertically and support many other custom features. The charts can be built as a view that can be added to a view group or as an intent, such as it can be used to start an activity. The model and the graphing code is well optimized such as it can handle and display huge number of values. AChartEngine is currently at the 1.0.0 release. New chart types will be added in the following releases. Please keep sending your feedback such as we can continually improve this library. Find us on Facebook, too: http://www.facebook.com/achartengine Read a short introduction to AChartEngine here: http://www.javaadvent.com/2012/12/achartengine-charting-library-for.html Another good tutorial can be read here: http://jaxenter.com/effort-free-graphs-on-android-with-achartengine-46199.html
0 stars 1 forks source link

Adding Y label after clearing causes crash #209

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new renderer use regular steps 
2. Add some labels using renderer.addYTextLabel()
3. Call renderer.clearYTextLabels() to remove old labels added in step 2.
4. Call renderer.addYTextLabel() to add new labels

What is the expected output? What do you see instead?
Expected: the old labels get cleared and the chart shows the new labels
Actual: it throws NullPointerException

Please provide a source code snippet that we can use to replicate the issue.
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.addYTextLabel(1.0, "old");
renderer.clearYTextLabels();
renderer.addYTextLabel(1.0, "new"); // should throw NullPointerException

What version of the product binary library are you using?
1.0.0

Please provide any additional information below.
clearYTextLabels() should clear the submaps of mYTextLabels, not mYTextLabels 
itself. The problem can be solved either by putting empty maps back into 
mTextLabels or by calling clear() of each submaps instead of calling 
mYTextLabel.clear().

Original issue reported on code.google.com by Frozenmo...@gmail.com on 13 Apr 2012 at 7:54

GoogleCodeExporter commented 9 years ago
Fixed in SVN rev. r387.

Original comment by dandrome...@gmail.com on 11 May 2012 at 6:35

GoogleCodeExporter commented 9 years ago
Good catch!

Original comment by dandrome...@gmail.com on 11 May 2012 at 6:35

GoogleCodeExporter commented 9 years ago
Hi,

You show where is the problem and solution in .java file. 

But we have only .jar file , so please provide .jar file after updating issue 
changes. 

Original comment by darshitp...@gmail.com on 13 Sep 2012 at 5:28

GoogleCodeExporter commented 9 years ago
Where is it possible to get the jar with the issue fixed?

Thanks, 

Original comment by roby.bru...@gmail.com on 18 Feb 2013 at 11:53

GoogleCodeExporter commented 9 years ago
You can download a version including this feature here: 
https://repository-achartengine.forge.cloudbees.com/snapshot/org/achartengine/ac
hartengine/1.1.0/

Original comment by dandrome...@gmail.com on 18 Feb 2013 at 11:55