public GooglePieChartConfiguration(string chartTitle,
                                    MeasurementUnitTypeEnum measurementUnitTypeEnum,
                                    List <GooglePieChartSlice> googlePieChartSlices,
                                    GoogleChartType googleChartType,
                                    GoogleChartDataTable googleChartDataTable) : base(chartTitle,
                                                                                      true,
                                                                                      googleChartType,
                                                                                      googleChartDataTable,
                                                                                      new GoogleChartAxis("Year", null, null),
                                                                                      new List <GoogleChartAxis> {
     new GoogleChartAxis(null, measurementUnitTypeEnum, null)
 })
 {
     PieSliceTextStyle = new GoogleChartTextStyle("black");
     ChartArea         = new GoogleChartConfigurationArea(10, 10);
     Slices            = googlePieChartSlices;
 }
        public static MeasurementUnitType ToType(MeasurementUnitTypeEnum enumValue)
        {
            switch (enumValue)
            {
            case MeasurementUnitTypeEnum.Acres:
                return(Acres);

            case MeasurementUnitTypeEnum.Count:
                return(Count);

            case MeasurementUnitTypeEnum.CubicFeet:
                return(CubicFeet);

            case MeasurementUnitTypeEnum.CubicFeetPerSecond:
                return(CubicFeetPerSecond);

            case MeasurementUnitTypeEnum.CubicYards:
                return(CubicYards);

            case MeasurementUnitTypeEnum.Feet:
                return(Feet);

            case MeasurementUnitTypeEnum.Gallons:
                return(Gallons);

            case MeasurementUnitTypeEnum.GallonsPerDay:
                return(GallonsPerDay);

            case MeasurementUnitTypeEnum.Inches:
                return(Inches);

            case MeasurementUnitTypeEnum.InchesPerHour:
                return(InchesPerHour);

            case MeasurementUnitTypeEnum.Kilogram:
                return(Kilogram);

            case MeasurementUnitTypeEnum.Meters:
                return(Meters);

            case MeasurementUnitTypeEnum.MilligamsPerLiter:
                return(MilligamsPerLiter);

            case MeasurementUnitTypeEnum.Minutes:
                return(Minutes);

            case MeasurementUnitTypeEnum.Percent:
                return(Percent);

            case MeasurementUnitTypeEnum.PercentDecline:
                return(PercentDecline);

            case MeasurementUnitTypeEnum.PercentDeviation:
                return(PercentDeviation);

            case MeasurementUnitTypeEnum.PercentIncrease:
                return(PercentIncrease);

            case MeasurementUnitTypeEnum.Pounds:
                return(Pounds);

            case MeasurementUnitTypeEnum.Seconds:
                return(Seconds);

            case MeasurementUnitTypeEnum.SquareFeet:
                return(SquareFeet);

            case MeasurementUnitTypeEnum.Tons:
                return(Tons);

            default:
                throw new ArgumentException(string.Format("Unable to map Enum: {0}", enumValue));
            }
        }
Beispiel #3
0
        public static MeasurementUnitType ToType(MeasurementUnitTypeEnum enumValue)
        {
            switch (enumValue)
            {
            case MeasurementUnitTypeEnum.AcreFeet:
                return(AcreFeet);

            case MeasurementUnitTypeEnum.Acres:
                return(Acres);

            case MeasurementUnitTypeEnum.CanopyBulkDensity:
                return(CanopyBulkDensity);

            case MeasurementUnitTypeEnum.Celsius:
                return(Celsius);

            case MeasurementUnitTypeEnum.ChemicalConcentrationLipidWeight:
                return(ChemicalConcentrationLipidWeight);

            case MeasurementUnitTypeEnum.ChemicalConcentrationWetWeight:
                return(ChemicalConcentrationWetWeight);

            case MeasurementUnitTypeEnum.Count:
                return(Count);

            case MeasurementUnitTypeEnum.CubicFoot_Second:
                return(CubicFoot_Second);

            case MeasurementUnitTypeEnum.CubicYards:
                return(CubicYards);

            case MeasurementUnitTypeEnum.Dollars:
                return(Dollars);

            case MeasurementUnitTypeEnum.Feet:
                return(Feet);

            case MeasurementUnitTypeEnum.Gallon:
                return(Gallon);

            case MeasurementUnitTypeEnum.Hectare:
                return(Hectare);

            case MeasurementUnitTypeEnum.Hours:
                return(Hours);

            case MeasurementUnitTypeEnum.Inches:
                return(Inches);

            case MeasurementUnitTypeEnum.InchesPerHour:
                return(InchesPerHour);

            case MeasurementUnitTypeEnum.Kilogram:
                return(Kilogram);

            case MeasurementUnitTypeEnum.Kilometer:
                return(Kilometer);

            case MeasurementUnitTypeEnum.LinearFeet:
                return(LinearFeet);

            case MeasurementUnitTypeEnum.LinearStreamMiles:
                return(LinearStreamMiles);

            case MeasurementUnitTypeEnum.Meters:
                return(Meters);

            case MeasurementUnitTypeEnum.MetricTons:
                return(MetricTons);

            case MeasurementUnitTypeEnum.Miles:
                return(Miles);

            case MeasurementUnitTypeEnum.MilligamsPerLiter:
                return(MilligamsPerLiter);

            case MeasurementUnitTypeEnum.NephlometricTurbidityUnit:
                return(NephlometricTurbidityUnit);

            case MeasurementUnitTypeEnum.Number:
                return(Number);

            case MeasurementUnitTypeEnum.Parcels:
                return(Parcels);

            case MeasurementUnitTypeEnum.PartsPerBillion:
                return(PartsPerBillion);

            case MeasurementUnitTypeEnum.PartsPerMillion:
                return(PartsPerMillion);

            case MeasurementUnitTypeEnum.Percent:
                return(Percent);

            case MeasurementUnitTypeEnum.PeriphytonBiomassIndex:
                return(PeriphytonBiomassIndex);

            case MeasurementUnitTypeEnum.PerSquareKilometer:
                return(PerSquareKilometer);

            case MeasurementUnitTypeEnum.PerSquareMeter:
                return(PerSquareMeter);

            case MeasurementUnitTypeEnum.Pounds:
                return(Pounds);

            case MeasurementUnitTypeEnum.Seconds:
                return(Seconds);

            case MeasurementUnitTypeEnum.SquareFeet:
                return(SquareFeet);

            case MeasurementUnitTypeEnum.Therms:
                return(Therms);

            case MeasurementUnitTypeEnum.Tons:
                return(Tons);

            default:
                throw new ArgumentException(string.Format("Unable to map Enum: {0}", enumValue));
            }
        }
Beispiel #4
0
        public static MeasurementUnitType ToType(MeasurementUnitTypeEnum enumValue)
        {
            switch (enumValue)
            {
            case MeasurementUnitTypeEnum.AcreFeet:
                return(AcreFeet);

            case MeasurementUnitTypeEnum.Acres:
                return(Acres);

            case MeasurementUnitTypeEnum.CubicYards:
                return(CubicYards);

            case MeasurementUnitTypeEnum.Dollars:
                return(Dollars);

            case MeasurementUnitTypeEnum.Gallon:
                return(Gallon);

            case MeasurementUnitTypeEnum.Hours:
                return(Hours);

            case MeasurementUnitTypeEnum.Kilogram:
                return(Kilogram);

            case MeasurementUnitTypeEnum.LinearFeet:
                return(LinearFeet);

            case MeasurementUnitTypeEnum.Meters:
                return(Meters);

            case MeasurementUnitTypeEnum.MetricTons:
                return(MetricTons);

            case MeasurementUnitTypeEnum.Miles:
                return(Miles);

            case MeasurementUnitTypeEnum.MilligamsPerLiter:
                return(MilligamsPerLiter);

            case MeasurementUnitTypeEnum.NephlometricTurbidityUnit:
                return(NephlometricTurbidityUnit);

            case MeasurementUnitTypeEnum.Number:
                return(Number);

            case MeasurementUnitTypeEnum.Parcels:
                return(Parcels);

            case MeasurementUnitTypeEnum.PartsPerBillion:
                return(PartsPerBillion);

            case MeasurementUnitTypeEnum.PartsPerMillion:
                return(PartsPerMillion);

            case MeasurementUnitTypeEnum.Percent:
                return(Percent);

            case MeasurementUnitTypeEnum.PeriphytonBiomassIndex:
                return(PeriphytonBiomassIndex);

            case MeasurementUnitTypeEnum.Pounds:
                return(Pounds);

            case MeasurementUnitTypeEnum.SquareFeet:
                return(SquareFeet);

            case MeasurementUnitTypeEnum.Therms:
                return(Therms);

            case MeasurementUnitTypeEnum.Tons:
                return(Tons);

            default:
                throw new ArgumentException(string.Format("Unable to map Enum: {0}", enumValue));
            }
        }