本文整理汇总了Java中com.github.mikephil.charting.charts.LineChart.setDrawYValues方法的典型用法代码示例。如果您正苦于以下问题:Java LineChart.setDrawYValues方法的具体用法?Java LineChart.setDrawYValues怎么用?Java LineChart.setDrawYValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.mikephil.charting.charts.LineChart
的用法示例。
在下文中一共展示了LineChart.setDrawYValues方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.github.mikephil.charting.charts.LineChart; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Log.v(TAG, "onCreateView() chart fragment");
// Load the layout of this fragment
View rootView = inflater.inflate(R.layout.fragment_chart, container, false);
createDataSets();
mChart = (LineChart) rootView.findViewById(R.id.chart1);
mChart.setOnChartValueSelectedListener(this);
mChart.setDrawYValues(false);
mChart.setDrawGridBackground(false);
mChart.setDescription("Battery and CPU usage chart");
mChart.setYRange(0, 100, false);
mChart.setDrawLegend(true);
initChart();
mChart.invalidate(); // invalidates the whole view
return rootView;
}
示例2: setupGraph
import com.github.mikephil.charting.charts.LineChart; //导入方法依赖的package包/类
public void setupGraph(String courseID,int index,View v) {
LineChart l = (LineChart) v.findViewById(R.id.linechart);
l.setStartAtZero(false);
l.setDescription("");
l.setDrawYValues(false);
ArrayList<DataPoint> grades = new DataManager(getActivity()).getCourseDatapoints(courseID);
if (grades != null && grades.size() > 0 ) {
LineData dataSet = constructDataSet(grades, Constants.COLORS[index % Constants.COLORS.length]);
l.setData(dataSet);
}
}
示例3: initStatChart
import com.github.mikephil.charting.charts.LineChart; //导入方法依赖的package包/类
private void initStatChart() {
mChart = (LineChart) findViewById(R.id.chart1);
mChart.setStartAtZero(true);
// disable the drawing of values into the chart
mChart.setDrawYValues(false);
mChart.setDrawXLabels(false);
mChart.setDrawBorder(false);
mChart.setBorderPositions(new BarLineChartBase.BorderPosition[] {
BarLineChartBase.BorderPosition.BOTTOM
});
// no description text
mChart.setNoDataText(getResources().getString(R.string.no_game_data_title));
mChart.setNoDataTextDescription(getResources().getString(R.string.no_game_data_title_desc));
// enable value highlighting
mChart.setHighlightEnabled(true);
// enable touch gestures
mChart.setTouchEnabled(true);
mChart.setDescription("");
// enable scaling and dragging
mChart.setDragEnabled(true);
mChart.setScaleEnabled(true);
mChart.setPinchZoom(true);
mChart.setHighlightIndicatorEnabled(false);
mStatManager = new GameStatManager(getBaseContext());
mChart.animateX(500);
mChart.setBackgroundColor(Color.WHITE);
mChart.setValueTextColor(mColor);
mChart.setDrawLegend(false);
mChart.setDrawVerticalGrid(false);
mChart.setDrawGridBackground(false);
mChart.setGridColor(Color.BLACK & 0x2FFFFFFF);
mChart.setGridWidth(5f);
mChart.setBorderColor(mColor);
YLabels y = mChart.getYLabels();
y.setTextColor(mColor);
y.setLabelCount(4);
}