android - 如何在 MPAndroidChart 条形图中的 yAxis 上绘制自定义值?
问题描述
我想在 Barchart 中的 yAxis 上显示我自己的值,我写了一个代码片段(值格式化程序),但是当我使用它时应用程序崩溃了,
public class YAixsFormatter implements IAxisValueFormatter
{
List<String> time;
public YAixsFormatter(List<String> time) {
this.time = time;
}
@Override
public String getFormattedValue(float value, AxisBase axis) {
return time.get((int)value).concat(" mins");
}
解决方案
推荐阅读
- github - GitHub:如何将我拥有的存储库转移到我拥有的组织并将其保存在我的私人帐户中?
- javascript - 仅在进行条带付款时提交表格
- sql - 在 SQL 中使用带有空部分的 if 语句
- flutter - Flutter:变量中小部件的动态列表
- php - php diff 函数 - 当我得到两个日期之间的差异时的错误
- wso2 - 有没有办法使用 WSO2 每分钟调用一次 REST API?
- azure - 将消息重新排队到 Azure 主题订阅
- java - Java 路径未在 Hadoop 中得到识别
- git - GIT:致命:协议错误:错误的行长度字符:这个
- python - 基于用户输入的迷宫中的移动顺序