// Path: app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartExample/src/com/xxmassdeveloper/mpchartexample/custom/MyMarkerView.java
// public class MyMarkerView extends MarkerView {
// 
//     private TextView tvContent;
// 
//     public MyMarkerView(Context context, int layoutResource) {
//         super(context, layoutResource);
// 
//         tvContent = (TextView) findViewById(R.id.tvContent);
//     }
// 
//     // callbacks everytime the MarkerView is redrawn, can be used to update the
//     // content (user-interface)
//     @Override
//     public void refreshContent(Entry e, Highlight highlight) {
// 
//         if (e instanceof CandleEntry) {
// 
//             CandleEntry ce = (CandleEntry) e;
// 
//             tvContent.setText("" + Utils.formatNumber(ce.getHigh(), 0, true));
//         } else {
// 
//             tvContent.setText("" + Utils.formatNumber(e.getVal(), 0, true));
//         }
//     }
// 
//     @Override
//     public int getXOffset(float xpos) {
//         // this will center the marker-view horizontally
//         return -(getWidth() / 2);
//     }
// 
//     @Override
//     public int getYOffset(float ypos) {
//         // this will cause the marker-view to be above the selected value
//         return -getHeight();
//     }
// }


import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.components.Legend;
import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.listener.ChartTouchListener;
import com.github.mikephil.charting.listener.OnChartGestureListener;
import com.xxmassdeveloper.mpchartexample.R;
import com.xxmassdeveloper.mpchartexample.custom.MyMarkerView;
        leftAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true)

        mChart.getAxisRight().setEnabled(false);
        
        XAxis xAxis = mChart.getXAxis();
        xAxis.setEnabled(false);
        
        // programatically add the chart
        FrameLayout parent = (FrameLayout) v.findViewById(R.id.parentLayout);
        parent.addView(mChart);
        
        return v;
    }

    @Override
    public void onChartGestureStart(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
        Log.i("Gesture", "START");
    }

    @Override
    public void onChartGestureEnd(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
        Log.i("Gesture", "END");
        mChart.highlightValues(null);
    }

    @Override
    public void onChartLongPressed(MotionEvent me) {
        Log.i("LongPress", "Chart longpressed.");
    }

// Path: app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartExample/src/com/xxmassdeveloper/mpchartexample/custom/MyMarkerView.java
// public class MyMarkerView extends MarkerView {
// 
//     private TextView tvContent;
// 
//     public MyMarkerView(Context context, int layoutResource) {
//         super(context, layoutResource);
// 
//         tvContent = (TextView) findViewById(R.id.tvContent);
//     }
// 
//     // callbacks everytime the MarkerView is redrawn, can be used to update the
//     // content (user-interface)
//     @Override
//     public void refreshContent(Entry e, Highlight highlight) {
// 
//         if (e instanceof CandleEntry) {
// 
//             CandleEntry ce = (CandleEntry) e;
// 
//             tvContent.setText("" + Utils.formatNumber(ce.getHigh(), 0, true));
//         } else {
// 
//             tvContent.setText("" + Utils.formatNumber(e.getVal(), 0, true));
//         }
//     }
// 
//     @Override
//     public int getXOffset(float xpos) {
//         // this will center the marker-view horizontally
//         return -(getWidth() / 2);
//     }
// 
//     @Override
//     public int getYOffset(float ypos) {
//         // this will cause the marker-view to be above the selected value
//         return -getHeight();
//     }
// }


// Path: app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartExample/src/com/xxmassdeveloper/mpchartexample/fragments/BarChartFrag.java
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.components.Legend;
import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.listener.ChartTouchListener;
import com.github.mikephil.charting.listener.OnChartGestureListener;
import com.xxmassdeveloper.mpchartexample.R;
import com.xxmassdeveloper.mpchartexample.custom.MyMarkerView;

        leftAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true)

        mChart.getAxisRight().setEnabled(false);
        
        XAxis xAxis = mChart.getXAxis();
        xAxis.setEnabled(false);
        
        // programatically add the chart
        FrameLayout parent = (FrameLayout) v.findViewById(R.id.parentLayout);
        parent.addView(mChart);
        
        return v;
    }

    @Override
    public void onChartGestureStart(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
        Log.i("Gesture", "START");
    }

    @Override
    public void onChartGestureEnd(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
        Log.i("Gesture", "END");
        mChart.highlightValues(null);
    }

    @Override
    public void onChartLongPressed(MotionEvent me) {
        Log.i("LongPress", "Chart longpressed.");
    }

    @Override