I'm using AChartEngine library for Android to create a time chart.
I wonder if is there any way I can limit the zoom so that the X labels do not appear duplicated as in the image?
There are some ways to fix this. For instance, you can change the date format of the time chart you are displaying.
Related
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.
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);
i am developing an android application using AChartEngine library and i am using PojectStatusChart but i am facing a problem with the x-Axis labels. it is set to dates an i want to change it to Strings but i don't know how to
can someone help me plz ?
The ProjectStatusChart is a time chart, so it has X axis labels as dates. You can either look at another example in the demo package or modify it from time chart to line chart for instance.
I'm using achartengine to show a temperature graph. on X axis I put dates, to fit them I call setXLabelsAngle(45); this is the result:
As you can see, the labels are placed too high and go over the x-Axis. How could I fix this? I'm already using setMargins(), but labels don't move, only legend does.
This will help:
renderer.setXLabelsAlign(Align.LEFT);
I am developing an android app, using AChartEngine for implementing the graphs in my application. Now I want to display the weekday name as the label for the x axis. Thank fully I am able to do it but the default labels (2,4,6,8,....) are still displaying. I have googled regarding it but won't be able to find the solution. I have upload the image of concern below.
Set the X labels size to 1
renderer.setXLabels(1);