gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-17 05:18:40 26 4
gpt4 key购买 nike

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

YAxis.setTypeface介绍

暂无

代码示例

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

@Override
  public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.frag_simple_line, container, false);

    chart = v.findViewById(R.id.lineChart1);

    chart.getDescription().setEnabled(false);

    chart.setDrawGridBackground(false);

    chart.setData(getComplexity());
    chart.animateX(3000);

    Typeface tf = Typeface.createFromAsset(context.getAssets(), "OpenSans-Light.ttf");

    Legend l = chart.getLegend();
    l.setTypeface(tf);

    YAxis leftAxis = chart.getAxisLeft();
    leftAxis.setTypeface(tf);

    chart.getAxisRight().setEnabled(false);

    XAxis xAxis = chart.getXAxis();
    xAxis.setEnabled(false);

    return v;
  }
}

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

leftAxis.setTypeface(tf);
leftAxis.setAxisMaximum(1.2f);
leftAxis.setAxisMinimum(-1.2f);

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

leftAxis.setTypeface(mTf);
leftAxis.setLabelCount(5, false);
leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)
rightAxis.setTypeface(mTf);
rightAxis.setLabelCount(5, false);
rightAxis.setDrawGridLines(false);

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

leftAxis.setTypeface(tfLight);
leftAxis.setLabelCount(5, false);
leftAxis.setSpaceTop(15f);
rightAxis.setTypeface(tfLight);
rightAxis.setLabelCount(5, false);
rightAxis.setSpaceTop(15f);

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

leftAxis.setTypeface(tf);
rightAxis.setTypeface(tf);
rightAxis.setDrawGridLines(false);

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

leftAxis.setTypeface(mTf);
leftAxis.setLabelCount(5, false);
leftAxis.setSpaceTop(20f);
rightAxis.setTypeface(mTf);
rightAxis.setLabelCount(5, false);
rightAxis.setSpaceTop(20f);

代码示例来源: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

y.setTypeface(tfLight);
y.setLabelCount(6, false);
y.setTextColor(Color.WHITE);

代码示例来源: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_draw_chart);
  setTitle("DrawChartActivity");
  chart = findViewById(R.id.chart1);
  // listener for selecting and drawing
  chart.setOnChartValueSelectedListener(this);
  chart.setOnDrawListener(this);
  // if disabled, drawn data sets with the finger will not be automatically
  // finished
  // chart.setAutoFinish(true);
  chart.setDrawGridBackground(false);
  // add dummy-data to the chart
  initWithDummyData();
  XAxis xl = chart.getXAxis();
  xl.setTypeface(tfRegular);
  xl.setAvoidFirstLastClipping(true);
  YAxis yl = chart.getAxisLeft();
  yl.setTypeface(tfRegular);
  chart.getLegend().setEnabled(false);
  // chart.setYRange(-40f, 40f, true);
  // call this to reset the changed y-range
  // chart.resetYRange(true);
}

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

yl.setTypeface(tfLight);
yl.setDrawAxisLine(true);
yl.setDrawGridLines(true);
yr.setTypeface(tfLight);
yr.setDrawAxisLine(true);
yr.setDrawGridLines(false);

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

yl.setTypeface(tfLight);
yl.setAxisMinimum(0f); // this replaces setStartAtZero(true)

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

yl.setTypeface(tfLight);
yl.setSpaceTop(30f);
yl.setSpaceBottom(30f);

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

leftAxis.setTypeface(tfLight);
leftAxis.setValueFormatter(new LargeValueFormatter());
leftAxis.setDrawGridLines(false);

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

leftAxis.setTypeface(tfLight);
leftAxis.setLabelCount(6, false);
leftAxis.setAxisMinimum(-2.5f);
rightAxis.setTypeface(tfLight);
rightAxis.setLabelCount(6, false);
rightAxis.setAxisMinimum(-2.5f);

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

leftAxis.setTypeface(tfLight);
leftAxis.setTextColor(ColorTemplate.getHoloBlue());
leftAxis.setDrawGridLines(true);

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

leftAxis.setTypeface(tfLight);
leftAxis.setLabelCount(8, false);
leftAxis.setValueFormatter(custom);
rightAxis.setTypeface(tfLight);
rightAxis.setLabelCount(8, false);
rightAxis.setValueFormatter(custom);

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

leftAxis.setTypeface(tfLight);
leftAxis.setTextColor(ColorTemplate.getHoloBlue());
leftAxis.setAxisMaximum(200f);
rightAxis.setTypeface(tfLight);
rightAxis.setTextColor(Color.RED);
rightAxis.setAxisMaximum(900);

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

yAxis.setTypeface(tfLight);
yAxis.setLabelCount(5, false);
yAxis.setTextSize(9f);

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

leftAxis.setTypeface(tfLight);
leftAxis.setTextColor(Color.WHITE);
leftAxis.setAxisMaximum(100f);

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

@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.frag_simple_line, container, false);
    
    mChart = (LineChart) v.findViewById(R.id.lineChart1);

    mChart.getDescription().setEnabled(false);

    mChart.setDrawGridBackground(false);
    
    mChart.setData(getComplexity());
    mChart.animateX(3000);
    
    Typeface tf = Typeface.createFromAsset(getActivity().getAssets(),"OpenSans-Light.ttf");
    
    Legend l = mChart.getLegend();
    l.setTypeface(tf);
    
    YAxis leftAxis = mChart.getAxisLeft();
    leftAxis.setTypeface(tf);
    
    mChart.getAxisRight().setEnabled(false);
    
    XAxis xAxis = mChart.getXAxis();
    xAxis.setEnabled(false);
    
    return v;
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com