我的图表显示正常,但只要我滚动到一边,我就会出现随机时间并且它会弄乱日期,请参见这张图片:http: //img14.imageshack.us/img14/8329/statqs.jpg
我只想显示日期而不显示其他任何内容,我不知道渲染器是如何得出我从未输入的时间的。
另外我想知道如何防止向左(x 轴)和向下(负 y)滚动,我不能再使用 SetPanLimits,因为我的 x 值是日期而不是数字。
任何帮助将不胜感激!
我的图表显示正常,但只要我滚动到一边,我就会出现随机时间并且它会弄乱日期,请参见这张图片:http: //img14.imageshack.us/img14/8329/statqs.jpg
我只想显示日期而不显示其他任何内容,我不知道渲染器是如何得出我从未输入的时间的。
另外我想知道如何防止向左(x 轴)和向下(负 y)滚动,我不能再使用 SetPanLimits,因为我的 x 值是日期而不是数字。
任何帮助将不胜感激!
我知道这已经很老了,但是对于下一个用户来说,找到解决方案可能会有所帮助。
您可以指定要使用的日期格式
/**
* 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, "");
}
要仅显示日期和月份,请使用以下内容:
Intent intent = ChartFactory.getTimeChartIntent(context, dataset, mRenderer, "dd-MMM");