本文整理了Java中com.github.mikephil.charting.components.YAxis.setGranularity()
方法的一些代码示例,展示了YAxis.setGranularity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAxis.setGranularity()
方法的具体详情如下:
包路径:com.github.mikephil.charting.components.YAxis
类名称:YAxis
方法名:setGranularity
暂无
代码示例来源:origin: PhilJay/MPAndroidChart
yAxis.setGranularity(50f);
renderer = new YAxisRenderer(null, yAxis, null);
代码示例来源:origin: PhilJay/MPAndroidChart
leftAxis.setAxisMaximum(2.5f);
leftAxis.setGranularityEnabled(true);
leftAxis.setGranularity(0.1f);
rightAxis.setAxisMinimum(-2.5f);
rightAxis.setAxisMaximum(2.5f);
rightAxis.setGranularity(0.1f);
代码示例来源:origin: fossasia/pslab-android
left.setValueFormatter(new LogicAnalyzerAxisFormatter(channelNames));
left.setTextColor(Color.WHITE);
left.setGranularity(1f);
left.setTextSize(12f);
logicLinesChart.getAxisRight().setDrawLabels(false);
代码示例来源:origin: zhuanghongji/mp-android-chart
leftAxis.setAxisMaximum(2.5f);
leftAxis.setGranularityEnabled(true);
leftAxis.setGranularity(0.1f);
rightAxis.setAxisMinimum(-2.5f);
rightAxis.setAxisMaximum(2.5f);
rightAxis.setGranularity(0.1f);
代码示例来源:origin: fossasia/pslab-android
left.setValueFormatter(new LogicAnalyzerAxisFormatter(channelNames));
left.setTextColor(Color.WHITE);
left.setGranularity(1f);
left.setTextSize(12f);
logicLinesChart.getAxisRight().setDrawLabels(false);
代码示例来源:origin: fossasia/pslab-android
left.setValueFormatter(new LogicAnalyzerAxisFormatter(channelNames));
left.setTextColor(Color.WHITE);
left.setGranularity(1f);
left.setTextSize(12f);
logicLinesChart.getAxisRight().setDrawLabels(false);
代码示例来源:origin: fossasia/pslab-android
left.setValueFormatter(new LogicAnalyzerAxisFormatter(channelNames));
left.setTextColor(Color.WHITE);
left.setGranularity(1f);
left.setTextSize(12f);
logicLinesChart.getAxisRight().setDrawLabels(false);
代码示例来源:origin: xiaolongonly/Ticket-Analysis
yAxis.setGranularity(50f);
renderer = new YAxisRenderer(null, yAxis, null);
代码示例来源:origin: WenWangAndroid/ChartManager
yAxis.setGranularity(50f);
renderer = new YAxisRenderer(null, yAxis, null);
代码示例来源:origin: xiaolongonly/Ticket-Analysis
public LineChart generateLineChartConfig(LineChart lineChart) {
//XY轴配置
XAxis xAxis = lineChart.getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM); //定制X轴是在图表上方还是下方。
xAxis.setDrawGridLines(false);
xAxis.setGranularity(1);
YAxis yAxisRight = lineChart.getAxisRight();
yAxisRight.setEnabled(false);
YAxis yAxisLeft = lineChart.getAxisLeft();
yAxisLeft.setAxisMinimum(0);
yAxisLeft.setGranularity(1);
//背景设置
lineChart.setDrawGridBackground(false);//表格背景绘制
lineChart.setBackgroundColor(AppContext.getContext().getResources().getColor(R.color.white));
//Legend定制
lineChart.getLegend().setPosition(Legend.LegendPosition.ABOVE_CHART_LEFT);
lineChart.getLegend().setForm(Legend.LegendForm.CIRCLE);//Legend样式
//图表描述
lineChart.setDescription(null);
// 设置无数据文本提示
lineChart.setNoDataText("暂无数据");
//设置单方向和双方向缩放 true x,y方向可以同时控制,false只能控制x方向的缩小放大或者Y方向的缩小放大
lineChart.setPinchZoom(true);
return lineChart;
}
内容来源于网络,如有侵权,请联系作者删除!