Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In bar charts the bars overlap the values at their ends and there is no way to set a margin to avoid this #444

Open
GoogleCodeExporter opened this issue Jul 4, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.Create orizontal bar chart with some values

What is the expected output? What do you see instead?
-The espected output is a bar chart shown correctly instead the bars overlap 
the value at their end.

-The code is exactly as in the sample app
The related code piece is:

String[] titles = new String[] { "2008", "2007" };
    List<double[]> values = new ArrayList<double[]>();
    values.add(new double[] { 14230, 12300, 14240, 15244, 15900, 19200, 22030, 21200, 19500, 15500,
        12600, 14000 });
    values.add(new double[] { 5230, 7300, 9240, 10540, 7900, 9200, 12030, 11200, 9500, 10500,
        11600, 13500 });
    int[] colors = new int[] { Color.BLUE, Color.CYAN };
    XYMultipleSeriesRenderer renderer = buildBarRenderer(colors);
    setChartSettings(renderer, "Monthly sales in the last 2 years", "Month", "Units sold", 0.5,
        12.5, 0, 24000, Color.GRAY, Color.LTGRAY);
    ((XYSeriesRenderer) renderer.getSeriesRendererAt(0)).setDisplayChartValues(true);
    ((XYSeriesRenderer) renderer.getSeriesRendererAt(1)).setDisplayChartValues(true);
    renderer.setXLabels(12);
    renderer.setYLabels(10);
    renderer.setXLabelsAlign(Align.LEFT);
    renderer.setYLabelsAlign(Align.LEFT);
    renderer.setPanEnabled(true, false);
    // renderer.setZoomEnabled(false);
    renderer.setZoomRate(1.1f);
    renderer.setBarSpacing(0.5f);
    return ChartFactory.getBarChartIntent(context, buildBarDataset(titles, values), renderer,
        Type.STACKED);



What version of the product binary library are you using?
I'm using the latest night build 1.2.0

Please provide any additional information below.

-See the attachment. In addition there is a similar problem with the points in 
line charts, if you set a slightly bigger size for the point there is no way to 
set a margin between the point and its value label and the point overlap its 
value.

Original issue reported on code.google.com by andreafa...@gmail.com on 11 Oct 2014 at 11:52

Attachments:

@GoogleCodeExporter
Copy link
Author

I have also opened a question on Stackoverflow for this issue
http://stackoverflow.com/questions/26304491/how-to-set-edge-points-margins-with-
achartengine-library

Original comment by andreafa...@gmail.com on 11 Oct 2014 at 11:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant