当前位置: 首页>>代码示例>>Java>>正文


Java XAxisPosition.BOTTOM_INSIDE属性代码示例

本文整理汇总了Java中com.github.mikephil.charting.components.XAxis.XAxisPosition.BOTTOM_INSIDE属性的典型用法代码示例。如果您正苦于以下问题:Java XAxisPosition.BOTTOM_INSIDE属性的具体用法?Java XAxisPosition.BOTTOM_INSIDE怎么用?Java XAxisPosition.BOTTOM_INSIDE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.github.mikephil.charting.components.XAxis.XAxisPosition的用法示例。


在下文中一共展示了XAxisPosition.BOTTOM_INSIDE属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderAxisLine

@Override
public void renderAxisLine(Canvas c) {

    if (!mXAxis.isDrawAxisLineEnabled() || !mXAxis.isEnabled())
        return;

    mAxisLinePaint.setColor(mXAxis.getAxisLineColor());
    mAxisLinePaint.setStrokeWidth(mXAxis.getAxisLineWidth());

    if (mXAxis.getPosition() == XAxisPosition.TOP
            || mXAxis.getPosition() == XAxisPosition.TOP_INSIDE
            || mXAxis.getPosition() == XAxisPosition.BOTH_SIDED) {
        c.drawLine(mViewPortHandler.contentRight(),
                mViewPortHandler.contentTop(), mViewPortHandler.contentRight(),
                mViewPortHandler.contentBottom(), mAxisLinePaint);
    }

    if (mXAxis.getPosition() == XAxisPosition.BOTTOM
            || mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE
            || mXAxis.getPosition() == XAxisPosition.BOTH_SIDED) {
        c.drawLine(mViewPortHandler.contentLeft(),
                mViewPortHandler.contentTop(), mViewPortHandler.contentLeft(),
                mViewPortHandler.contentBottom(), mAxisLinePaint);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:25,代码来源:XAxisRendererHorizontalBarChart.java

示例2: renderAxisLine

@Override
public void renderAxisLine(Canvas c) {

    if (!mXAxis.isDrawAxisLineEnabled() || !mXAxis.isEnabled())
        return;

    mAxisLinePaint.setColor(mXAxis.getAxisLineColor());
    mAxisLinePaint.setStrokeWidth(mXAxis.getAxisLineWidth());
    mAxisLinePaint.setPathEffect(mXAxis.getAxisLineDashPathEffect());

    if (mXAxis.getPosition() == XAxisPosition.TOP
            || mXAxis.getPosition() == XAxisPosition.TOP_INSIDE
            || mXAxis.getPosition() == XAxisPosition.BOTH_SIDED) {
        c.drawLine(mViewPortHandler.contentLeft(),
                mViewPortHandler.contentTop(), mViewPortHandler.contentRight(),
                mViewPortHandler.contentTop(), mAxisLinePaint);
    }

    if (mXAxis.getPosition() == XAxisPosition.BOTTOM
            || mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE
            || mXAxis.getPosition() == XAxisPosition.BOTH_SIDED) {
        c.drawLine(mViewPortHandler.contentLeft(),
                mViewPortHandler.contentBottom(), mViewPortHandler.contentRight(),
                mViewPortHandler.contentBottom(), mAxisLinePaint);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:26,代码来源:XAxisRenderer.java

示例3: renderAxisLine

@Override
public void renderAxisLine(Canvas c) {

    if (!mXAxis.isDrawAxisLineEnabled() || !mXAxis.isEnabled())
        return;

    mAxisLinePaint.setColor(mXAxis.getAxisLineColor());
    mAxisLinePaint.setStrokeWidth(mXAxis.getAxisLineWidth());

    if (mXAxis.getPosition() == XAxisPosition.TOP
            || mXAxis.getPosition() == XAxisPosition.TOP_INSIDE
            || mXAxis.getPosition() == XAxisPosition.BOTH_SIDED) {
        c.drawLine(mViewPortHandler.contentLeft(),
                mViewPortHandler.contentTop(), mViewPortHandler.contentRight(),
                mViewPortHandler.contentTop(), mAxisLinePaint);
    }

    if (mXAxis.getPosition() == XAxisPosition.BOTTOM
            || mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE
            || mXAxis.getPosition() == XAxisPosition.BOTH_SIDED) {
        c.drawLine(mViewPortHandler.contentLeft(),
                mViewPortHandler.contentBottom(), mViewPortHandler.contentRight(),
                mViewPortHandler.contentBottom(), mAxisLinePaint);
    }
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:25,代码来源:XAxisRenderer.java

示例4: renderAxisLabels

@Override
public void renderAxisLabels(Canvas c) {

    if (!mXAxis.isEnabled() || !mXAxis.isDrawLabelsEnabled())
        return;

    float xoffset = mXAxis.getXOffset();

    mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
    mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
    mAxisLabelPaint.setColor(mXAxis.getTextColor());

    MPPointF pointF = MPPointF.getInstance(0,0);

    if (mXAxis.getPosition() == XAxisPosition.TOP) {
        pointF.x = 0.0f;
        pointF.y = 0.5f;
        drawLabels(c, mViewPortHandler.contentRight() + xoffset, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) {
        pointF.x = 1.0f;
        pointF.y = 0.5f;
        drawLabels(c, mViewPortHandler.contentRight() - xoffset, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {
        pointF.x = 1.0f;
        pointF.y = 0.5f;
        drawLabels(c, mViewPortHandler.contentLeft() - xoffset, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) {
        pointF.x = 1.0f;
        pointF.y = 0.5f;
        drawLabels(c, mViewPortHandler.contentLeft() + xoffset, pointF);

    } else { // BOTH SIDED
        pointF.x = 0.0f;
        pointF.y = 0.5f;
        drawLabels(c, mViewPortHandler.contentRight() + xoffset, pointF);
        pointF.x = 1.0f;
        pointF.y = 0.5f;
        drawLabels(c, mViewPortHandler.contentLeft() - xoffset, pointF);
    }

    MPPointF.recycleInstance(pointF);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:45,代码来源:XAxisRendererHorizontalBarChart.java

示例5: renderAxisLabels

@Override
public void renderAxisLabels(Canvas c) {

    if (!mXAxis.isEnabled() || !mXAxis.isDrawLabelsEnabled())
        return;

    float yoffset = mXAxis.getYOffset();

    mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
    mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
    mAxisLabelPaint.setColor(mXAxis.getTextColor());

    MPPointF pointF = MPPointF.getInstance(0,0);
    if (mXAxis.getPosition() == XAxisPosition.TOP) {
        pointF.x = 0.5f;
        pointF.y = 1.0f;
        drawLabels(c, mViewPortHandler.contentTop() - yoffset, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) {
        pointF.x = 0.5f;
        pointF.y = 1.0f;
        drawLabels(c, mViewPortHandler.contentTop() + yoffset + mXAxis.mLabelRotatedHeight, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {
        pointF.x = 0.5f;
        pointF.y = 0.0f;
        drawLabels(c, mViewPortHandler.contentBottom() + yoffset, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) {
        pointF.x = 0.5f;
        pointF.y = 0.0f;
        drawLabels(c, mViewPortHandler.contentBottom() - yoffset - mXAxis.mLabelRotatedHeight, pointF);

    } else { // BOTH SIDED
        pointF.x = 0.5f;
        pointF.y = 1.0f;
        drawLabels(c, mViewPortHandler.contentTop() - yoffset, pointF);
        pointF.x = 0.5f;
        pointF.y = 0.0f;
        drawLabels(c, mViewPortHandler.contentBottom() + yoffset, pointF);
    }
    MPPointF.recycleInstance(pointF);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:43,代码来源:XAxisRenderer.java

示例6: renderAxisLabels

@Override
public void renderAxisLabels(Canvas c) {

    if (!mXAxis.isEnabled() || !mXAxis.isDrawLabelsEnabled())
        return;

    float yoffset = mXAxis.getYOffset();

    mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
    mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
    mAxisLabelPaint.setColor(mXAxis.getTextColor());

    MPPointF pointF = MPPointF.getInstance(0,0);
    if (mXAxis.getPosition() == XAxisPosition.TOP) {
        pointF.x = 0.5f;
        pointF.y = 0.9f;
        drawLabels(c, mViewPortHandler.contentTop() - yoffset, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) {
        pointF.x = 0.5f;
        pointF.y = 1.0f;
        drawLabels(c, mViewPortHandler.contentTop() + yoffset + mXAxis.mLabelRotatedHeight, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {
        pointF.x = 0.5f;
        pointF.y = 0.0f;
        drawLabels(c, mViewPortHandler.contentBottom() + yoffset, pointF);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) {
        pointF.x = 0.5f;
        pointF.y = 0.0f;
        drawLabels(c, mViewPortHandler.contentBottom() - yoffset - mXAxis.mLabelRotatedHeight, pointF);

    } else { // BOTH SIDED
        pointF.x = 0.5f;
        pointF.y = 1.0f;
        drawLabels(c, mViewPortHandler.contentTop() - yoffset, pointF);
        pointF.x = 0.5f;
        pointF.y = 0.0f;
        drawLabels(c, mViewPortHandler.contentBottom() + yoffset, pointF);
    }
    MPPointF.recycleInstance(pointF);
}
 
开发者ID:letolab,项目名称:LETO-Toggl_Android,代码行数:43,代码来源:XAxisRenderer.java

示例7: renderAxisLabels

@Override
public void renderAxisLabels(Canvas c) {

    if (!mXAxis.isEnabled() || !mXAxis.isDrawLabelsEnabled())
        return;

    float xoffset = mXAxis.getXOffset();

    mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
    mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
    mAxisLabelPaint.setColor(mXAxis.getTextColor());

    if (mXAxis.getPosition() == XAxisPosition.TOP) {

        drawLabels(c, mViewPortHandler.contentRight() + xoffset,
                new PointF(0.0f, 0.5f));

    } else if (mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) {

        drawLabels(c, mViewPortHandler.contentRight() - xoffset,
                new PointF(1.0f, 0.5f));

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {

        drawLabels(c, mViewPortHandler.contentLeft() - xoffset,
                new PointF(1.0f, 0.5f));

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) {

        drawLabels(c, mViewPortHandler.contentLeft() + xoffset,
                new PointF(0.0f, 0.5f));

    } else { // BOTH SIDED

        drawLabels(c, mViewPortHandler.contentRight() + xoffset,
                new PointF(0.0f, 0.5f));
        drawLabels(c, mViewPortHandler.contentLeft() - xoffset,
                new PointF(1.0f, 0.5f));
    }
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:40,代码来源:XAxisRendererHorizontalBarChart.java

示例8: renderAxisLabels

@Override
public void renderAxisLabels(Canvas c) {

    if (!mXAxis.isEnabled() || !mXAxis.isDrawLabelsEnabled())
        return;

    float yoffset = mXAxis.getYOffset();

    mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
    mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
    mAxisLabelPaint.setColor(mXAxis.getTextColor());

    if (mXAxis.getPosition() == XAxisPosition.TOP) {

        drawLabels(c, mViewPortHandler.contentTop() - yoffset,
                new PointF(0.5f, 1.0f));

    } else if (mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) {

        drawLabels(c, mViewPortHandler.contentTop() + yoffset + mXAxis.mLabelRotatedHeight,
                new PointF(0.5f, 1.0f));

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {

        drawLabels(c, mViewPortHandler.contentBottom() + yoffset,
                new PointF(0.5f, 0.0f));

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) {

        drawLabels(c, mViewPortHandler.contentBottom() - yoffset - mXAxis.mLabelRotatedHeight,
                new PointF(0.5f, 0.0f));

    } else { // BOTH SIDED

        drawLabels(c, mViewPortHandler.contentTop() - yoffset,
                new PointF(0.5f, 1.0f));
        drawLabels(c, mViewPortHandler.contentBottom() + yoffset,
                new PointF(0.5f, 0.0f));
    }
}
 
开发者ID:muyoumumumu,项目名称:QuShuChe,代码行数:40,代码来源:XAxisRenderer.java

示例9: renderAxisLabels

@Override
public void renderAxisLabels(Canvas c) {

    if (!mXAxis.isEnabled() || !mXAxis.isDrawLabelsEnabled())
        return;

    float xoffset = mXAxis.getXOffset();

    mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
    mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
    mAxisLabelPaint.setColor(mXAxis.getTextColor());

    if (mXAxis.getPosition() == XAxisPosition.TOP) {

        mAxisLabelPaint.setTextAlign(Align.LEFT);
        drawLabels(c, mViewPortHandler.contentRight() + xoffset);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {

        mAxisLabelPaint.setTextAlign(Align.RIGHT);
        drawLabels(c, mViewPortHandler.contentLeft() - xoffset);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) {

        mAxisLabelPaint.setTextAlign(Align.LEFT);
        drawLabels(c, mViewPortHandler.contentLeft() + xoffset);

    } else if (mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) {

        mAxisLabelPaint.setTextAlign(Align.RIGHT);
        drawLabels(c, mViewPortHandler.contentRight() - xoffset);

    } else { // BOTH SIDED

        mAxisLabelPaint.setTextAlign(Align.RIGHT);
        drawLabels(c, mViewPortHandler.contentLeft() - xoffset);
        mAxisLabelPaint.setTextAlign(Align.LEFT);
        drawLabels(c, mViewPortHandler.contentRight() + xoffset);
    }
}
 
开发者ID:xinpengfei520,项目名称:P2P,代码行数:40,代码来源:XAxisRendererHorizontalBarChart.java

示例10: renderAxisLabels

@Override
public void renderAxisLabels(Canvas c) {

    if (!mXAxis.isEnabled() || !mXAxis.isDrawLabelsEnabled())
        return;

    float yoffset = Utils.convertDpToPixel(4f);

    mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
    mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
    mAxisLabelPaint.setColor(mXAxis.getTextColor());

    if (mXAxis.getPosition() == XAxisPosition.TOP) {

        drawLabels(c, mViewPortHandler.offsetTop() - yoffset);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {

        drawLabels(c, mViewPortHandler.contentBottom() + mXAxis.mLabelHeight + yoffset * 1.5f);

    } else if (mXAxis.getPosition() == XAxisPosition.BOTTOM_INSIDE) {

        drawLabels(c, mViewPortHandler.contentBottom() - yoffset);

    } else if (mXAxis.getPosition() == XAxisPosition.TOP_INSIDE) {

        drawLabels(c, mViewPortHandler.offsetTop() + yoffset + mXAxis.mLabelHeight);

    } else { // BOTH SIDED

        drawLabels(c, mViewPortHandler.offsetTop() - yoffset);
        drawLabels(c, mViewPortHandler.contentBottom() + mXAxis.mLabelHeight + yoffset * 1.6f);
    }
}
 
开发者ID:xinpengfei520,项目名称:P2P,代码行数:34,代码来源:XAxisRenderer.java


注:本文中的com.github.mikephil.charting.components.XAxis.XAxisPosition.BOTTOM_INSIDE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。