AChartEngine Broken Tags

My chart is displayed in order, but as soon as I scroll it to the side, I have a random time and it will ruin the dates, see this image: http://img14.imageshack.us/img14/8329/statqs.jpg

I would only like to show the date and nothing else, I don’t know what the rendering looks like over time, when I never entered.

Also I would like to know how I can prevent scrolling left (x axis) and down (negative y), I can no longer use SetPanLimits, because my x values ​​are dates, not numbers.

Any help would be greatly appreciated!

0
source share
1 answer

I know this is very old, but for the next user it can help with the solution.

You can specify the date format to use.

/** * Creates a time chart intent that can be used to start the graphical view * activity. * * @param context the context * @param dataset the multiple series dataset (cannot be null) * @param renderer the multiple series renderer (cannot be null) * @param format the date format pattern to be used for displaying the X axis * date labels. If null, a default appropriate format will be used. * @return a time chart intent * @throws IllegalArgumentException if dataset is null or renderer is null or * if the dataset and the renderer don't include the same number of * series */ public static final Intent getTimeChartIntent(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, String format) { return getTimeChartIntent(context, dataset, renderer, format, ""); } 

To show only the day and month, use something like the following:

 Intent intent = ChartFactory.getTimeChartIntent(context, dataset, mRenderer, "dd-MMM"); 
+1
source

Source: https://habr.com/ru/post/1395446/


All Articles