Closed RichardSleet closed 2 years ago
https://github.com/PhilJay/MPAndroidChart/wiki/YAxis
YAxis yAxis = mChart.getAxisLeft(); yAxis.setTypeface(...); // set a different font yAxis.setTextSize(12f); // set the text size yAxis.setAxisMinimum(0f); // start at zero yAxis.setAxisMaximum(100f); // the axis maximum is 100 yAxis.setTextColor(Color.BLACK); yAxis.setValueFormatter(new MyValueFormatter()); yAxis.setGranularity(1f); // interval 1 yAxis.setLabelCount(6, true); // force 6 labels //... and more
start at zero
private void setYAxisInfo(YAxis axis,ReadableMap v){ if(v.hasKey("startAtZero")) axis.setStartAtZero(v.getBoolean("startAtZero")); if(v.hasKey("axisMaxValue")) axis.setAxisMaxValue((float) v.getDouble("axisMaxValue"));