// Path: library/src/main/java/com/linheimx/app/library/adapter/DefaultHighLightValueAdapter.java
// public class DefaultHighLightValueAdapter implements IValueAdapter {
// 
//     public DefaultHighLightValueAdapter() {
// 
//     }
// 
//     @Override
//     public String value2String(double value) {
//         return value + "";
//     }
// 
// }
// 
// Path: library/src/main/java/com/linheimx/app/library/adapter/IValueAdapter.java
// public interface IValueAdapter {
//     String value2String(double value);
// }
// 
// Path: library/src/main/java/com/linheimx/app/library/utils/Utils.java
// public class Utils {
// 
//     public static float dp2px(float dp) {
//         return (int) (dp * Resources.getSystem().getDisplayMetrics().density);
//     }
//     
//     public static float textWidth(Paint paint, String txt) {
//         return paint.measureText(txt);
//     }
// 
//     private static Paint.FontMetrics mFontMetrics = new Paint.FontMetrics();
// 
//     public static int textHeightAsc(Paint paint) {
//         paint.getFontMetrics(mFontMetrics);
//         return (int) (Math.abs(mFontMetrics.ascent));
//     }
// 
//     public static int textHeight(Paint paint) {
//         paint.getFontMetrics(mFontMetrics);
//         return (int) (Math.abs(mFontMetrics.ascent) + Math.abs(mFontMetrics.descent));
//     }
// 
//     /**
//      * 将杂乱的数字变成里程碑。
//      *
//      * @param number
//      * @return
//      */
//     public static float roundNumber2One(double number) {
//         if (Double.isInfinite(number) ||
//                 Double.isNaN(number) ||
//                 number == 0.0)
//             return 0;
// 
//         final float d = (float) Math.ceil((float) Math.log10(number < 0 ? -number : number));//有几位？
//         final int pw = 1 - (int) d;
//         final float magnitude = (float) Math.pow(10, pw);
//         final long shifted = Math.round(number * magnitude);
//         return shifted / magnitude;
//     }
// 
// 
// }


import android.graphics.Color;
import com.linheimx.app.library.adapter.DefaultHighLightValueAdapter;
import com.linheimx.app.library.adapter.IValueAdapter;
import com.linheimx.app.library.utils.Utils;
package com.linheimx.app.library.model;



/**
 * Created by lijian on 2016/12/15.
 */

public class HighLight {

    public static final float D_HIGHLIGHT_WIDTH = 1;
    public static final float D_HINT_TEXT_SIZE = 15;

    //////////////////////// high light ////////////////////////
    int highLightColor = Color.RED;
    float highLightWidth;

    //////////////////////// hint ////////////////////////
    int hintColor = Color.BLACK;
    float hintTextSize;

    boolean enable = false;
    boolean isDrawHighLine = true;
    boolean isDrawHint = true;

    protected IValueAdapter xValueAdapter;// 高亮时，x应该如何显示？
    protected IValueAdapter yValueAdapter;// 高亮时，y应该如何显示？


    public HighLight() {

        highLightWidth = Utils.dp2px(D_HIGHLIGHT_WIDTH);
        hintTextSize = Utils.dp2px(D_HINT_TEXT_SIZE);

        xValueAdapter = new DefaultHighLightValueAdapter();
// Path: library/src/main/java/com/linheimx/app/library/adapter/DefaultHighLightValueAdapter.java
// public class DefaultHighLightValueAdapter implements IValueAdapter {
// 
//     public DefaultHighLightValueAdapter() {
// 
//     }
// 
//     @Override
//     public String value2String(double value) {
//         return value + "";
//     }
// 
// }
// 
// Path: library/src/main/java/com/linheimx/app/library/adapter/IValueAdapter.java
// public interface IValueAdapter {
//     String value2String(double value);
// }
// 
// Path: library/src/main/java/com/linheimx/app/library/utils/Utils.java
// public class Utils {
// 
//     public static float dp2px(float dp) {
//         return (int) (dp * Resources.getSystem().getDisplayMetrics().density);
//     }
//     
//     public static float textWidth(Paint paint, String txt) {
//         return paint.measureText(txt);
//     }
// 
//     private static Paint.FontMetrics mFontMetrics = new Paint.FontMetrics();
// 
//     public static int textHeightAsc(Paint paint) {
//         paint.getFontMetrics(mFontMetrics);
//         return (int) (Math.abs(mFontMetrics.ascent));
//     }
// 
//     public static int textHeight(Paint paint) {
//         paint.getFontMetrics(mFontMetrics);
//         return (int) (Math.abs(mFontMetrics.ascent) + Math.abs(mFontMetrics.descent));
//     }
// 
//     /**
//      * 将杂乱的数字变成里程碑。
//      *
//      * @param number
//      * @return
//      */
//     public static float roundNumber2One(double number) {
//         if (Double.isInfinite(number) ||
//                 Double.isNaN(number) ||
//                 number == 0.0)
//             return 0;
// 
//         final float d = (float) Math.ceil((float) Math.log10(number < 0 ? -number : number));//有几位？
//         final int pw = 1 - (int) d;
//         final float magnitude = (float) Math.pow(10, pw);
//         final long shifted = Math.round(number * magnitude);
//         return shifted / magnitude;
//     }
// 
// 
// }


// Path: library/src/main/java/com/linheimx/app/library/model/HighLight.java
import android.graphics.Color;
import com.linheimx.app.library.adapter.DefaultHighLightValueAdapter;
import com.linheimx.app.library.adapter.IValueAdapter;
import com.linheimx.app.library.utils.Utils;

package com.linheimx.app.library.model;



/**
 * Created by lijian on 2016/12/15.
 */

public class HighLight {

    public static final float D_HIGHLIGHT_WIDTH = 1;
    public static final float D_HINT_TEXT_SIZE = 15;

    //////////////////////// high light ////////////////////////
    int highLightColor = Color.RED;
    float highLightWidth;

    //////////////////////// hint ////////////////////////
    int hintColor = Color.BLACK;
    float hintTextSize;

    boolean enable = false;
    boolean isDrawHighLine = true;
    boolean isDrawHint = true;

    protected IValueAdapter xValueAdapter;// 高亮时，x应该如何显示？
    protected IValueAdapter yValueAdapter;// 高亮时，y应该如何显示？


    public HighLight() {

        highLightWidth = Utils.dp2px(D_HIGHLIGHT_WIDTH);
        hintTextSize = Utils.dp2px(D_HINT_TEXT_SIZE);

        xValueAdapter = new DefaultHighLightValueAdapter();
        yValueAdapter = new DefaultHighLightValueAdapter();