MPAndroidChart 中的日期时间轴 [英] DateTime axis in MPAndroidChart

查看:108
本文介绍了MPAndroidChart 中的日期时间轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中使用 MPAndroidChart.我想使用 yAxis 上的值和 xAxis 上的日期绘制图表.我在 MPAndroidChart API 中没有找到任何日期时间轴.有没有办法使用日期绘制xAxis?我有根据日期绘制的值.我想在 xAxis 上显示 (ddMMM-yy) 格式的日期和 yAxis 上的值.任何人都可以将示例链接传递给我吗?

I am using MPAndroidChart in my app. I want to plot the chart using values on yAxis and dates on the xAxis. I didn't find any datetime axis in the MPAndroidChart API. Is there any way to plot the xAxis using date? I have values to plot against dates. I want to show the dates in (ddMMM-yy) format on xAxis and the values on yAxis. Can anyone can pass me the sample link for the same?

示例数据:

Date(xAxis) | Value(yAxis)
------------|-------------
01/01/2001  |  966.78
01/02/2001  |  666.78
01/03/2001  |  966.78
01/04/2001  |  966.78
01/05/2001  |  966.78
01/06/2001  |  966.78
01/07/2001  |  966.78

推荐答案

这是最古老的增强功能之一.不幸的是 MPAndroid 还不支持它.来源:https://github.com/PhilJay/MPAndroidChart/issues/12https://github.com/PhilJay/MPAndroidChart/issues/133

It is one of the oldest enhancements. Unfortunatelly MPAndroid does not support it yet. Source: https://github.com/PhilJay/MPAndroidChart/issues/12 https://github.com/PhilJay/MPAndroidChart/issues/133

这篇关于MPAndroidChart 中的日期时间轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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