AChartEngine Graph's View Empty Legend Area Wasted - android

That orange area is also given to AchartEngine to draw its graph. Achartengine occupies that area for it's legend. But even i have done dr.setShowLegend(false); , achart does not occupy or adjust it's graph location according to that area. Also i can not shrink the graph view because the reason above, pie chart would also shrink. What i ask is, is there any way to customize there (custom legend) or make pie fill up almost all area?

You can Use setMarginsmethod to set Some margin of PieChart .
mRenderer.setMargins(new int[] {top, left, bottom, right});

Related

MPAndroidChart with two charts value padding

I'm using MPAndroidChart in order to draw two charts however when the two values are close they overlap like the picture
is there a way to solve this for example by setting padding on values on the red chart to be drawn on top of the green one?

How to draw stacked part only of the barchart in a dashed (dotted) line using MPAndroidChart?

I am using MPAndroidChart to draw a horizontal stacked bar chart. What I need is to draw the stacked area of each bar in a dotted line. Also if it is possible I need to fill that stacked area with a transparent colour or dashed lines. All that is to show my stacked part of bars as possible improvements of the data I am showing on each bar.
I guess that can be achieved using a BarChartCustomRenderer but I am not sure.
What you are asking for is not a part of the library. I had a similar case where I wanted the top of each stacked bar to be rounded and had to subclass BarChartRenderer to do it.

Make the miniature squares under a barGraph scrollable using mpandroidchart

I have a barGraph similar to the one below.
I was wondering if the miniature ( maybe the word is not accurate, I'm talking about the little coloured squares under the x axis, on the left of the word "Company" on the picture ) can be set to scrollable when the graph contains a lot of datas.
If so, is there as well a way to set those squares touchable and on touch, to center the view on the corresponding element of a barGraph?
I add that the graph itself is and has to be scrollable.
Thanks in advance.
The little squares you are talking about represent the Legend which shows the different datasets used.
It is not possible to make this scrollable by default.
What you could do is create your own miniature BarChart below your actual barchart and use that one.

achartengine change location of origin

I'm drawing a BarChart with AChartEngine on Android.
I made the chart horizontal by changing the orientation of the XYMultipleSeriesRenderer:
mMSRenderer.setOrientation(Orientation.VERTICAL);
(it seems counter-intuitive that horizontal is set with Orientation.VERTICAL, but that's not the point of my question).
The origin of the plot is on the top left corner, while I would like it in the bottom left, so that values go increasing from the bottom to the top.
Is this possible?
This is not possible with AChartEngine as it is out of the box.
However, you can try to put your data in your dataset in a reversed order and add custom labels instead of the default ones.

Have achartengine draw on top of the axis

As of right now if I have a line chart value that is straight horizontal or vertical and happens to be the exact value as one of the grid lines, then it becomes really tough to see. Is there any way to change the Z order of how things are drawn such that everything draws over the grid lines?
No, there isn't such API.
However, you can play with the colors, for instance set some transparency level of the grid lines color, axes color.

Categories

Resources