 /* Copyright 2012 Yaqiang Wang,
 * yaqiang.wang@gmail.com
 * 
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
 * General Public License for more details.
 */
package org.meteoinfo.geometry.legend;

/**
 * Chart type enum
 *
 * @author Yaqiang Wang
 */
public enum ChartTypes {

    WIND_VECTOR,
    WIND_BARB,
    STATION_MODEL,
    BAR_CHART,
    PIE_CHART;

    public static ChartTypes valueOfBack(String value) {
        switch (value.toUpperCase()) {
            case "WINDVECTOR":
                return ChartTypes.WIND_VECTOR;
            case "WINDBARB":
                return ChartTypes.WIND_BARB;
            case "STATIONMODEL":
                return ChartTypes.STATION_MODEL;
            case "BARCHART":
                return ChartTypes.BAR_CHART;
            case "PIECHART":
                return ChartTypes.PIE_CHART;
            default:
                return ChartTypes.valueOf(value.toUpperCase());
        }
    }
}
