Hi vik30.
If some x-axis labels can be omitted, you may consider to omit some labels (eg. using Axis.setLabelStep).
For example, if the labels are 0, 1, 2, 3, ...., 100. Even if you omit some labels and just show 0, 10, 20, ...100, the chart is still understandable. On the other hand, if the labels are the name of all countries in the world, we cannot omit any label.
For example:
// omit some labels, so that the spacing among labels is at least 50 pixels
c.xAxis().setLabelStep(myLabels.Length * 50 / c.getPlotArea().getWidth());
Another thing I notice is that the bars are completely black. It is probably because the border color is black. The bar is so thin that you can only see the border. You may consider to change the bar border color to Chart.SameAsMainColor:
layer.setBorderColor(Chart.SameAsMainColor);
For thin bars, sometimes it may look better by setting the bars to touch:
layer.setBarGap(Chart.TouchBar);
Hope this can help.
Regards
Peter Kwan |