
package com.github.mikephil.charting.components;

import android.graphics.Color;

/**
 * Class representing the x-axis labels settings. Only use the setter methods to
 * modify it. Do not access public variables directly. Be aware that not all
 * features the XLabels class provides are suitable for the RadarChart.
 *
 * @author Philipp Jahoda
 */
public class CustomXAxis extends XAxis {

    private int mXAxisLabelBackgroundColor = Color.argb(200, 140, 234, 255);
    /**
     * boolen used to enable or disable label background, default is enabled
     */
    private boolean mEnableLabelBackground = false;


    public CustomXAxis(){
        super();
    }

    public void setLabelBackgroundColor(int color){
        mXAxisLabelBackgroundColor = color;
    }

    public void setLabelBackgroundColor(String colorHex){
        mXAxisLabelBackgroundColor = Color.parseColor(colorHex);
    }

    public int getXAxisLabelBackgroundColor(){
        return mXAxisLabelBackgroundColor;
    }

    /**
     * Enable/disable X Axis label background, default is disabled.
     * @param enable
     */
    public void setDrawLabelBackground(boolean enable){
        mEnableLabelBackground = enable;
    }

    /**
     *
     * @return boolean true if drawing label background is enabled otherwise false
     */
    public boolean isDrawLabelBackgroundEnabled(){
        return mEnableLabelBackground;
    }


}
