【问题标题】:Create custom X axis line in MPAndroidChart在 MPAndroidChart 中创建自定义 X 轴线
【发布时间】:2016-02-08 00:02:44
【问题描述】:

我想创建一条自定义 X 轴线。(标记为红色)

让它看起来像这样:

是否有可用于此的覆盖? 谢谢

更新我的意思是如果 X 轴设计的设计可以被覆盖而不是值。对不起,我不够清楚。因此,第二张图像上的条形图和 Xaxis 之间的灰色线。如何实现?

【问题讨论】:

    标签: android mpandroidchart


    【解决方案1】:

    是的,您可以定义自己的轴值:

    Axis axisX = new Axis();
    Axis axisY = new Axis().setHasLines(true);
    List<AxisValue> axisValues = new ArrayList<>();
    //put your values in this array
    axisValues.add(new AxisValue(27));
    axisValues.add(new AxisValue(28));
    axisValues.add(new AxisValue(29));
    //...
    axisX.setValues(axisValues);
    

    【讨论】:

    • 似乎在 3.0.2 版本上无效
    猜你喜欢
    • 2020-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-26
    • 1970-01-01
    • 2015-12-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多