File tree Expand file tree Collapse file tree
MPChartExample/src/com/xxmassdeveloper/mpchartexample
MPChartLib/src/com/github/mikephil/charting Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ protected void onCreate(Bundle savedInstanceState) {
127127 leftAxis .setAxisMaxValue (220f );
128128 leftAxis .setAxisMinValue (-50f );
129129 leftAxis .setStartAtZero (false );
130+ //leftAxis.setYOffset(20f);
130131 leftAxis .enableGridDashedLine (10f , 10f , 0f );
131132
132133 // limit lines are drawn behind data (and not on top)
Original file line number Diff line number Diff line change @@ -93,11 +93,13 @@ public enum AxisDependency {
9393 public YAxis () {
9494 super ();
9595 this .mAxisDependency = AxisDependency .LEFT ;
96+ this .mYOffset = 0f ;
9697 }
9798
9899 public YAxis (AxisDependency position ) {
99100 super ();
100101 this .mAxisDependency = position ;
102+ this .mYOffset = 0f ;
101103 }
102104
103105 public AxisDependency getAxisDependency () {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ public void renderAxisLabels(Canvas c) {
157157 mAxisLabelPaint .setColor (mYAxis .getTextColor ());
158158
159159 float xoffset = mYAxis .getXOffset ();
160- float yoffset = Utils .calcTextHeight (mAxisLabelPaint , "A" ) / 2.5f ;
160+ float yoffset = Utils .calcTextHeight (mAxisLabelPaint , "A" ) / 2.5f + mYAxis . getYOffset () ;
161161
162162 AxisDependency dependency = mYAxis .getAxisDependency ();
163163 YAxisLabelPosition labelPosition = mYAxis .getLabelPosition ();
You can’t perform that action at this time.
0 commit comments