NikhithaTarala / achartengine

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

Pie Chart: margins at 45 degree when using custom colors from resource #155

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a pie chart
2. Add color resources to your android project 
3. Use the values of the color resources for the chart

What is the expected output? What do you see instead?
No piece of the resulting pie has a margin. This is true when using "Color.RED" 
as in the sample provided. Margins are introduced when i switched to custom 
colors defined as resources. These margins appear at 45 degrees in the 
background color.   

Please provide a source code snippet that we can use to replicate the issue.

//set the color of the piece of the pie
        int[] colors = new int[points.size()];
        for (int i = 0; i < points.size(); i++){
            series.add(categories.get(i), m_values[i]);
            switch(points.get(i))
            {
            case 0:
                //colors[i] = Color.RED;
                colors[i] = getResources().getColor(R.color.red);
                break;
            case 1:
                //colors[i] = Color.YELLOW;
                colors[i] = getResources().getColor(R.color.orange);
                break;
            case 2:
                //colors[i] = Color.GREEN;
                colors[i] = getResources().getColor(R.color.green);;
                break;
            default:
                colors[i] = getResources().getColor(R.color.red);;
                break;
            }
        }

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

Please see the screenshot attached. 

Original issue reported on code.google.com by jensen....@gmail.com on 24 Nov 2011 at 9:47

Attachments:

GoogleCodeExporter commented 9 years ago
Can you please provide a full test class? I don't really understand the issue.

Original comment by dandrome...@gmail.com on 5 Jan 2012 at 3:58

GoogleCodeExporter commented 9 years ago
No feedback on this issue.

Original comment by dandrome...@gmail.com on 10 Jan 2012 at 8:22

GoogleCodeExporter commented 9 years ago
I will create a sample eclipse project and upload it as the issue appears if 
colors from the ressource file are used. If you zoom into the picture provided 
you will see three thin white lines that should not be there.  

Original comment by jensen....@gmail.com on 16 Jan 2012 at 10:10

GoogleCodeExporter commented 9 years ago
Please see this sample eclipse project.  

Original comment by jensen....@gmail.com on 16 Jan 2012 at 10:52

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 20 Jan 2012 at 8:59

GoogleCodeExporter commented 9 years ago
Please try it with the 1.1.0-rc2 from here http://achartengine.org/download/ 
and let me know if you still see the issue.

Original comment by dandrome...@gmail.com on 12 Jan 2013 at 9:21

GoogleCodeExporter commented 9 years ago
I tried it with version 1.1.0-rc2 and the problem stil exists. I attached the 
project that reproduces the issue. 

Original comment by jensen....@gmail.com on 15 Jan 2013 at 8:39

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 15 Jan 2013 at 10:03

GoogleCodeExporter commented 9 years ago
The problem with this bug is that I don't understand it. Please post some 
better screenshots and explanation.

Original comment by dandrome...@gmail.com on 15 Jan 2013 at 10:06

GoogleCodeExporter commented 9 years ago
OK, I have finally managed to understand the issue.
I couldn't find a real fix, just some hacks, so I will just let it as it is.

Original comment by dandrome...@gmail.com on 19 Jan 2013 at 3:41