【问题标题】:Android GraphView plot only points on graph and change X axis positionAndroid GraphView 仅在图形上绘制点并更改 X 轴位置
【发布时间】:2014-08-12 16:10:10
【问题描述】:

我正在尝试使用 android graphview 库在 android 上创建图表。

1)我需要在图表上绘制点(目前,选项是 LineGraph 和 BarGraph)但是我希望只绘制点而不绘制线。

2) 更改 X 轴及其标签的位置(使其显示在顶部而不是底部)。

我正在查看 API,但找不到执行这些操作的方法。如果有人能提供帮助,我将不胜感激!

【问题讨论】:

    标签: android plot android-graphview


    【解决方案1】:

    使用 android GraphView 无法完全满足您的要求,但不应该很难修改库来做到这一点,因为这些功能已经存在。

    1. LineGraphView 可以绘制数据点。 看看方法

      • setDrawDataPoints
      • setDataPointsRadius
    2. BarGraphView 可以在 bar 的顶部绘制标签 看看方法

      • setDrawValuesOnTop

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-18
      • 2018-11-30
      • 1970-01-01
      • 1970-01-01
      • 2013-06-07
      • 1970-01-01
      相关资源
      最近更新 更多