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?
Related
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});
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.
Am writing a simple Android App where am drawing a line chat using AChartEngine. Am trying to fill the plot circle (i.e. inside the circle) with orange color. this is different from the plot line & circle color, which is purple in this case.
If I set
xySeriesRenderer.setFillPoints(true);
then it is filling the circle also with purple. But I want the inside color to be orange for teh plot circles. Any help?
Now, I have set setFillPoints(false) ans you can see the sample graph in the below link
https://docs.zoho.com/viewembeddoc.do?docId=o319tf3df85f1e9224f3e83210d356e364359&ftype=image&filename=Screen%20Shot%202013-10-22%20at%203.15.07%20PM.png&imgWidth=770&imgHeight=515
Use this
xySeriesRenderer.setColor(getResources().getColor(R.color.red_graph));
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.
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.