NikhithaTarala / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

seems can not set Gradient start from negative stop to zero.. #160

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. i constructed a barchart which contains two data array..one is for negative 
values,another is for positive..
2. i need set two gradient to show negative and positive values..so i set as 
below:

renderer.getSeriesRendererAt(0).setDisplayChartValues(true);
        renderer.getSeriesRendererAt(0).setChartValuesTextSize(12);
        renderer.getSeriesRendererAt(0).setGradientEnabled(true);
        renderer.getSeriesRendererAt(0).setGradientStart(0, Color.CYAN);
        renderer.getSeriesRendererAt(0).setGradientStop(500, Color.BLUE);

        renderer.getSeriesRendererAt(1).setDisplayChartValues(true);
        renderer.getSeriesRendererAt(1).setChartValuesTextSize(12);
        renderer.getSeriesRendererAt(1).setGradientEnabled(true);
        renderer.getSeriesRendererAt(1).setGradientStart(-500, Color.MAGENTA);
        renderer.getSeriesRendererAt(1).setGradientStop(0, Color.CYAN);

What i wanna is from 0 to 500..the gradient from color cyan to blue and it's 
working.. but from -500 to 0 the gradient should from color magenta to cyan.. 
not working...can specify what the problem is??many thanks!

What version of the product binary library are you using?
I'm using the AChartEngine 0.7.0 binary build library. 

Original issue reported on code.google.com by luzhen0...@gmail.com on 20 Dec 2011 at 8:42

GoogleCodeExporter commented 8 years ago
Please provide a full class for me to test.
I think you are not using the RangeCategorySeries correctly. Please see an 
example here: 
http://code.google.com/p/achartengine/source/browse/trunk/achartengine/demo/org/
achartengine/chartdemo/demo/chart/TemperatureChart.java

Original comment by dandrome...@gmail.com on 5 Jan 2012 at 6:45

GoogleCodeExporter commented 8 years ago
Do you have some complete code that I can use to replicate this issue?

Original comment by dandrome...@gmail.com on 10 Jan 2012 at 9:28

GoogleCodeExporter commented 8 years ago
I have the same issue as above, but with a single series passed to the Bar 
Chart and with the use of CategorySeries (instead of RangeCategorySeries). The 
package cannot render any negative bar chart values when r.setGradientEnabled 
is set to true (cannot see them at all on the chart). I am using my locally 
compiled JAR of AChartEngine 0.7.0.  I extracted and cleaned up the relevant 
class code and have attached it as a file (first post to this forum, not sure 
if i should have embedded the code or if there are code tags, etc). Let me know 
if you need anything else

Original comment by berzins....@gmail.com on 10 Mar 2012 at 4:32

Attachments:

GoogleCodeExporter commented 8 years ago
I'm seeing the same issue on AChartEngine 1.0.0.

Original comment by cknight1...@gmail.com on 31 Mar 2012 at 10:10

GoogleCodeExporter commented 8 years ago
Fixed in SVN rev. #389.

Original comment by dandrome...@gmail.com on 11 May 2012 at 7:29