如何设置AChartEngine为CombinedXYChart日期格式? [英] How to set the Date Format for CombinedXYChart in AChartEngine?

查看:203
本文介绍了如何设置AChartEngine为CombinedXYChart日期格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以设置日期格式,这样的时间图表中

I can set the date format in the time chart like this

final GraphicalView view = ChartFactory.getTimeChartView(context, dataset,
                mRenderer, "dd-MMM-yyyy");

但我不能做同样的ComninedXYChart的情况下

String[] types = new String[] { TimeChart.TYPE , ScatterChart.TYPE, ScatterChart.TYPE};
final GraphicalView view = 
    ChartFactory.getCombinedXYChartView(context, dataset, mRenderer, types);

图片:

image below:

什么想法?

推荐答案

在CombinedXYChart情况下,你将不得不使用自定义标签:

In the CombinedXYChart case, you will have to use custom labels:

// disable the default labels
renderer.setXLabels(0);
// add several such labels
renderer.addXTextLabel(x, "label");

这篇关于如何设置AChartEngine为CombinedXYChart日期格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆