Moving pie chart in Achartengine - android

I am using achartengine for creating piecharts in android. Now everything is going fine except that my pie chart can be dragged/moved to anywhere within the layout. I want my pie chart to be fixed at its own location.

Call renderer.setPanEnabled(false); on the DefaultRenderer object.

You may also want to disable the pinch zoom together with the pan:
renderer.setZoomEnabled(false);

Related

How to draw area chart in Android using MPAndroidChart?

I am looking for a way to draw area chart using MPAndroidChart. I am aware , I can use StackedBar Chart but that doesn't quite serve the purpose.
Is there a way to draw Area chart such as shown below using MPAndroidChart and if not what might be the suitable alternate?
sample image souce-wikipedia
you can make chart as you want using MPAndroidChart.
I tested using sample app in google Play Store(try search 'MPAndroidChart').
try multiLineChart and make option Toggle Filled. I think this is what you're looking for.

LineChart issue using MPAndroidChart library

I am trying to make a simple smooth line chart which show the X axis as date-time on bottom and Y axis as normal left side. I just started using MPAndroidChart API and its example app in Git. In the example Line chart I am not able to find option to change X axis labels to show on bottom instead of top as show currently.
Just like:
Also is there a way to handle date-time data for X axis values ?
Also I tried my hand on Androidplot API but to make the line smooth there I need to make changes in library code which is not compiling at all in my Eclipse and giving errors. Also in Androidplot I did not find an option to show popup with data once I click on line chart.
So if anyone know how to make a smooth line chart using Androidplot API without modifying its library code and how to bring small popup with data in Androidplot API please reply.
// XAxis settings
graph.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
graph.getXAxis().setLabelsToSkip(0);
// and
// make the line smooth
graph.getLineData().getDataSets().get(0).lineDataSet.setDrawCubic(true);
Refer this:
http://wptrafficanalyzer.in/blog/android-drawing-line-chart-using-achartengine/
for smooth curve lines please refer this:
How to make line with rounded (smooth) corners with AndroidPlot
Hope this may help you.
AChartEngine is a charting library for Android applications. Using AChartEngine library, we can plot various charts like line chart, area chart, pie chart, time chart, bubble chart etc.

AchartEngine Time Chart shifted to the right

I'm using AChartEngine library for Android and in time charts the x labels do not correspond to points on the graph as you can see in images.
It appears that the graph is slightly shifted to the right.
Any hint?
This can be fixed using this:
renderer.setXRoundedLabels(false);

Draw outline for the pie chart

i am using a chart engine to draw graph it works fine but i need to add an outline to the pie chart? how to do that
i have checked this
Link
and the graph should be something like this
graph image
That is not yet supported. You can create an issue in the AChartEngine tracker and ask for this to be implemented.

how to replace the legends of Piechart using achartengine API?

I am Using Achartengine Api for drawing pie chart. I am getting the legends displayed at the bottom of the Pie chart horizontally. but I want to display it on the right side of the Pie chart vertically. I heard that it can be done using setMargins() method . if I can use that please explain how to use that.
Thank you in advance.
The setMargins() API call is, as the name suggests, for setting the margins around the chart. You cannot move the legend using this and you actually cannot move the legend at all with AChartEngine. You can hide it.

Categories

Resources