android - MPAndroidChart - 图例标签被切断

标签 android label mpandroidchart

我正在使用 MPAndroidChart library .有人有这个问题吗? 当我将标签放在 BOTTOM 位置时,这些标签被剪掉了。

谢谢

enter image description here

最佳答案

这似乎是一个新的feature自 2015 年 6 月以来:

chart.getLegend().setWordWrapEnabled(true);

Javadoc:

/**
 * Should the legend word wrap? / this is currently supported only for:
 * BelowChartLeft, BelowChartRight, BelowChartCenter. / note that word
 * wrapping a legend takes a toll on performance. / you may want to set
 * maxSizePercent when word wrapping, to set the point where the text wraps.
 * / default: false
 * 
 * @param enabled
 */
public void setWordWrapEnabled(boolean enabled) {
    mWordWrapEnabled = enabled;
}

关于android - MPAndroidChart - 图例标签被切断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27847583/

相关文章:

java - 改造 2.0 抛出 "IllegalArgumentException: @Field parameters can only be used with form encoding"。如何进行正确的 API 查询并修复它?

c# - 是否可以选择 Windows 窗体标签上的文本?

android - MPandroidchart - 每个 xValue 代表 4 个点

android - MPAndroidChart 线图,线在中间被截断

android - MPAndroidChart 中的平滑线

android - 正确覆盖 RecyclerView 动画

java - 关于做大量计算的三个问题

ruby-on-rails - Ruby on Rails - f.label 上的 Completed 500 内部错误

swift - 如何快速增加标签的 y ?

android - 如何使用矢量在android中创建TreeView?