com.github.mikephil.charting.charts.BarChart.setDrawGridBackground()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(123)

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

BarChart.setDrawGridBackground介绍

暂无

代码示例

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

@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  View v = inflater.inflate(R.layout.frag_simple_bar, container, false);
  // create a new chart object
  chart = new BarChart(getActivity());
  chart.getDescription().setEnabled(false);
  chart.setOnChartGestureListener(this);
  MyMarkerView mv = new MyMarkerView(getActivity(), R.layout.custom_marker_view);
  mv.setChartView(chart); // For bounds control
  chart.setMarker(mv);
  chart.setDrawGridBackground(false);
  chart.setDrawBarShadow(false);
  Typeface tf = Typeface.createFromAsset(context.getAssets(), "OpenSans-Light.ttf");
  chart.setData(generateBarData(1, 20000, 12));
  Legend l = chart.getLegend();
  l.setTypeface(tf);
  YAxis leftAxis = chart.getAxisLeft();
  leftAxis.setTypeface(tf);
  leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)
  chart.getAxisRight().setEnabled(false);
  XAxis xAxis = chart.getXAxis();
  xAxis.setEnabled(false);
  // programmatically add the chart
  FrameLayout parent = v.findViewById(R.id.parentLayout);
  parent.addView(chart);
  return v;
}

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

holder.chart.setDrawGridBackground(false);

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

holder.chart.setDrawGridBackground(false);
holder.chart.setDrawBarShadow(false);

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

chart.setDrawGridBackground(false);

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

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
      WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.activity_scrollview);
  setTitle("ScrollViewActivity");
  chart = findViewById(R.id.chart1);
  chart.getDescription().setEnabled(false);
  // scaling can now only be done on x- and y-axis separately
  chart.setPinchZoom(false);
  chart.setDrawBarShadow(false);
  chart.setDrawGridBackground(false);
  XAxis xAxis = chart.getXAxis();
  xAxis.setPosition(XAxisPosition.BOTTOM);
  xAxis.setDrawGridLines(false);
  chart.getAxisLeft().setDrawGridLines(false);
  chart.getLegend().setEnabled(false);
  setData(10);
  chart.setFitBars(true);
}

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

chart.setDrawGridBackground(false);
chart.setDrawBarShadow(false);

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

chart.setDrawGridBackground(false);

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

chart.setDrawGridBackground(false);

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

chart.setDrawGridBackground(false);

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

chart.setDrawGridBackground(false);

代码示例来源:origin: survivingwithandroid/Surviving-with-android

private void initChartBar(BarChart chart) {
  chart.setTouchEnabled(true);
  chart.setDrawGridBackground(true);
  chart.getAxisRight().setEnabled(false);
  chart.setDrawGridBackground(true);
  YAxis leftAxis = chart.getAxisLeft();
  leftAxis.setAxisMaxValue(100F);
  leftAxis.setAxisMinValue(10F);
  leftAxis.setStartAtZero(false);
  leftAxis.setAxisLineWidth(2);
  leftAxis.setDrawGridLines(true);
  // X-Axis
  XAxis xAxis = chart.getXAxis();
  xAxis.resetLabelsToSkip();
  xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
  xAxis.setDrawGridLines(true);
}

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

@SuppressWarnings("ButterKnifeInjectNotCalled")
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mChart.getDescription().setEnabled(false);
  // if more than 60 entries are displayed in the chart, no values will be
  // drawn
  mChart.setMaxVisibleValueCount(60);
  // scaling can now only be done on x- and y-axis separately
  mChart.setPinchZoom(false);
  mChart.setDrawBarShadow(false);
  mChart.setDrawGridBackground(false);
  XAxis xAxis = mChart.getXAxis();
  xAxis.setPosition(XAxisPosition.BOTTOM);
  xAxis.setDrawGridLines(false);
  
  mChart.getAxisLeft().setDrawGridLines(false);
  // setting data
  mSeekBarX.setProgress(10);
  mSeekBarY.setProgress(100);
  // add a nice and smooth animation
  mChart.animateY(2500);
  
  mChart.getLegend().setEnabled(false);
}

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

data.setValueTextColor(Color.BLACK);
holder.chart.getDescription().setEnabled(false);
holder.chart.setDrawGridBackground(false);

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

holder.chart.setDrawGridBackground(false);
holder.chart.setDrawBarShadow(false);

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

mChart.setDrawGridBackground(false);
mChart.setDrawBarShadow(false);

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

@SuppressWarnings("ButterKnifeInjectNotCalled")
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mChart.getDescription().setEnabled(false);
  // scaling can now only be done on x- and y-axis separately
  mChart.setPinchZoom(false);
  mChart.setDrawBarShadow(false);
  mChart.setDrawGridBackground(false);
  XAxis xAxis = mChart.getXAxis();
  xAxis.setPosition(XAxisPosition.BOTTOM);
  xAxis.setDrawGridLines(false);
  mChart.getAxisLeft().setDrawGridLines(false);
  
  mChart.getLegend().setEnabled(false);
  setData(10);
  mChart.setFitBars(true);
}

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

mChart.setDrawGridBackground(false);
mChart.setDrawBarShadow(false);

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

chart.setDrawGridBackground(false);//设置网格背景
chart.setScaleEnabled(false);//设置缩放
chart.setDoubleTapToZoomEnabled(false);//设置双击不进行缩放

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

mChart.setDrawGridBackground(false);

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

barChart.setDrawGridBackground(false);

相关文章

微信公众号

最新文章

更多