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

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

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

YAxis.setDrawZeroLine介绍

[英]Set this to true to draw the zero-line regardless of weather other grid-lines are enabled or not. Default: false
[中]将其设置为true,以绘制零线,而不管是否启用了其他网格线。默认值:false

代码示例

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

chart.getAxisRight().setAxisMinimum(-25f);
chart.getAxisRight().setDrawGridLines(false);
chart.getAxisRight().setDrawZeroLine(true);
chart.getAxisRight().setLabelCount(7, false);
chart.getAxisRight().setValueFormatter(new CustomFormatter());

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

yl.setSpaceTop(30f);
yl.setSpaceBottom(30f);
yl.setDrawZeroLine(false);

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

left.setDrawAxisLine(false);
left.setDrawGridLines(false);
left.setDrawZeroLine(true); // draw a zero line
left.setZeroLineColor(Color.GRAY);
left.setZeroLineWidth(0.7f);

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

leftAxis.setAxisMinimum(-250f);
leftAxis.setDrawAxisLine(false);
leftAxis.setDrawZeroLine(false);
leftAxis.setDrawGridLines(false);

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

rightAxis.setAxisMinimum(-200);
rightAxis.setDrawGridLines(false);
rightAxis.setDrawZeroLine(false);
rightAxis.setGranularityEnabled(false);

代码示例来源:origin: AmazMod/AmazMod

leftAxis.setDrawZeroLine(false);
leftAxis.setDrawGridLines(true);
leftAxis.setAxisMinimum(0);

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

leftYAxis.setDrawZeroLine(true); // draw a zero line
leftYAxis.setZeroLineColor(Color.GRAY);
leftYAxis.setZeroLineWidth(1f);

代码示例来源:origin: zhuanghongji/mp-android-chart

mChart.getAxisRight().setAxisMinimum(-25f);
mChart.getAxisRight().setDrawGridLines(false);
mChart.getAxisRight().setDrawZeroLine(true);
mChart.getAxisRight().setLabelCount(7, false);
mChart.getAxisRight().setValueFormatter(new CustomFormatter());

代码示例来源:origin: zhuanghongji/mp-android-chart

left.setDrawAxisLine(false);
left.setDrawGridLines(false);
left.setDrawZeroLine(true); // draw a zero line
left.setZeroLineColor(Color.GRAY);
left.setZeroLineWidth(0.7f);

代码示例来源:origin: zhuanghongji/mp-android-chart

yl.setSpaceTop(30f);
yl.setSpaceBottom(30f);
yl.setDrawZeroLine(false);

代码示例来源:origin: WJKCharlie/MPAndroidChartTest

left.setDrawAxisLine(false);
left.setDrawGridLines(false);
left.setDrawZeroLine(true); // draw a zero line
left.setZeroLineColor(Color.DKGRAY);
left.setZeroLineWidth(1f);

代码示例来源:origin: zhuanghongji/mp-android-chart

@SuppressWarnings("ButterKnifeInjectNotCalled")
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mChart.setBackgroundColor(Color.WHITE);
  mChart.setGridBackgroundColor(mFillColor);
  mChart.setDrawGridBackground(true);
  mChart.setDrawBorders(true);
  // no description text
  mChart.getDescription().setEnabled(false);
  // if disabled, scaling can be done on x- and y-axis separately
  mChart.setPinchZoom(false);
  Legend l = mChart.getLegend();
  l.setEnabled(false);
  XAxis xAxis = mChart.getXAxis();
  xAxis.setEnabled(false);
  YAxis leftAxis = mChart.getAxisLeft();
  leftAxis.setAxisMaximum(900f);
  leftAxis.setAxisMinimum(-250f);
  leftAxis.setDrawAxisLine(false);
  leftAxis.setDrawZeroLine(false);
  leftAxis.setDrawGridLines(false);
  mChart.getAxisRight().setEnabled(false);
  // add data
  setData(100, 60);
  mChart.invalidate();
}

代码示例来源:origin: zhuanghongji/mp-android-chart

leftAxis.setDrawZeroLine(false);

代码示例来源:origin: zhuanghongji/mp-android-chart

rightAxis.setAxisMinimum(-200);
rightAxis.setDrawGridLines(false);
rightAxis.setDrawZeroLine(false);
rightAxis.setGranularityEnabled(false);

相关文章

YAxis类方法