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);
Related
I've been working with Androidplot library for generating line plots and be able to do zoom and pan, so I'm using a modified version of XYPlotZoomPan class.
My current chart is showing some values per day, in a range of dates, so if I'm showing 7 days the domain axis is readable but if I'm trying to show 30 days it turns into a mess.
My goal is to show 7 days and have the option of scrolling through the rest of the chart that is not shown.
The only function that handles boundaries is setDomainBoundaries, currently I've tried this:
setDomainBoundaries(min, max, BoundaryMode.FIXED);
But it lets me show values inside this range and I'm loosing the ability for panning through the rest of the days.
Does someone have an a idea how I can do that? Thanks.
You can create your own domain value format with myplot.setDomainValueFormat(Format f). From here you can create your own formatter.
Another option you can look at is setDomainStep, a good example of that can be found here
I'm using the AchartEngine libraries to make a pie chart app. But I want to display two dimensional data like this
I can get nice standard pie charts but I know how to do the second dimension. Can anyone please help? The guys on the achartengine-google-support group say it's possible but I was redirected here for tech questions.
Many Thanks
If you take a look at the Budget Pie chart demo it shows you how to highlight a section of your pie chart (https://code.google.com/p/achartengine/source/browse/trunk/achartengine/demo/org/achartengine/chartdemo/demo/chart/BudgetPieChart.java). Take a look at "Project 1" below to see how this looks.
However there is no way to change the radius like you want to in your screenshot above. If you want to achieve this the easiest way would be to extend PieChart and copy over the draw method. In the draw method where it renders highlighted sections (if (seriesRenderer.isHighlighted()) ...) use a different radius instead of translating to an offset.
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.
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.
Hi I am using A chart Engine to display pie chart in android.In my code I want to show values on labels and area corresponding to that vale on legend.But I am unable to get that one.Please can any one helps to me.Thanks in advance.
I want like below
Displaying the pie labels with separate values from the legend labels is not possible in AChartEngine.
However, you can display the pie slice value (age in your case) in the middle of each slice, using:
renderer.setDisplayChartValues(true);
There was a bug in the code that was preventing displaying the chart values when the labels were not displaying. I have just fixed this issue in SVN. You can checkout the code according to this page and run an ant dist in order to build an up to date achartengine.jar file including this fix.
I was also having the same problem but now its solved. Thanks dan...
You can use
renderer.setDisplayValues(true);
This displays the %of distribution in the pie chart itself.