com.github.mikephil.charting.components.YAxis.getLabelPosition()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中com.github.mikephil.charting.components.YAxis.getLabelPosition()方法的一些代码示例,展示了YAxis.getLabelPosition()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAxis.getLabelPosition()方法的具体详情如下:
包路径:com.github.mikephil.charting.components.YAxis
类名称:YAxis
方法名:getLabelPosition

YAxis.getLabelPosition介绍

[英]returns the position of the y-labels
[中]

代码示例

代码示例来源:origin: PhilJay/MPAndroidChart

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

代码示例来源:origin: PhilJay/MPAndroidChart

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: PhilJay/MPAndroidChart

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  return isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART;
}

代码示例来源:origin: com.github.PhilJay/MPAndroidChart

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

代码示例来源:origin: xiaolongonly/Ticket-Analysis

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

代码示例来源:origin: WenWangAndroid/ChartManager

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

代码示例来源:origin: com.github.PhilJay/MPAndroidChart

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: xiaolongonly/Ticket-Analysis

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: WenWangAndroid/ChartManager

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: com.github.PhilJay/MPAndroidChart

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: WenWangAndroid/ChartManager

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: xiaolongonly/Ticket-Analysis

YAxisLabelPosition labelPosition = mYAxis.getLabelPosition();

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

myMarkerViewRight.layout(0, 0, myMarkerViewRight.getMeasuredWidth(), myMarkerViewRight.getMeasuredHeight());
if (getAxisLeft().getLabelPosition() == YAxis.YAxisLabelPosition.OUTSIDE_CHART) {
  myMarkerViewLeft.draw(canvas, mViewPortHandler.contentLeft() - myMarkerViewLeft.getWidth() / 2, pos[1] + myMarkerViewLeft.getHeight() / 2);
} else {
  myMarkerViewLeft.draw(canvas, mViewPortHandler.contentLeft() + myMarkerViewLeft.getWidth() / 2, pos[1] + myMarkerViewLeft.getHeight() / 2);
if (getAxisRight().getLabelPosition() == YAxis.YAxisLabelPosition.OUTSIDE_CHART) {
  myMarkerViewRight.draw(canvas, mViewPortHandler.contentRight() + myMarkerViewRight.getWidth() / 2, pos[1] + myMarkerViewRight.getHeight() / 2);//- myMarkerViewRight.getWidth()
} else {

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

myMarkerViewLeft.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
myMarkerViewLeft.layout(0, 0, myMarkerViewLeft.getMeasuredWidth(), myMarkerViewLeft.getMeasuredHeight());
if (getAxisLeft().getLabelPosition() == YAxis.YAxisLabelPosition.OUTSIDE_CHART) {
  myMarkerViewLeft.draw(canvas, mViewPortHandler.contentLeft() - myMarkerViewLeft.getWidth() / 2, pos[1] + myMarkerViewLeft.getHeight() / 2);//+ CommonUtil.dip2px(getContext(),20)   - myMarkerViewLeft.getHeight() / 2
} else {
myMarkerViewRight.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
myMarkerViewRight.layout(0, 0, myMarkerViewRight.getMeasuredWidth(), myMarkerViewRight.getMeasuredHeight());// - myMarkerViewRight.getHeight() / 2
if (getAxisRight().getLabelPosition() == YAxis.YAxisLabelPosition.OUTSIDE_CHART) {
  myMarkerViewRight.draw(canvas, mViewPortHandler.contentRight() + myMarkerViewRight.getWidth() / 2, pos[1] + myMarkerViewLeft.getHeight() / 2);// - CommonUtil.dip2px(getContext(),20)
} else {

相关文章

YAxis类方法