예제 #1
0
        internal override Hashtable ToHashtable()
        {
            Hashtable hashtables = new Hashtable();

            if (Align != Align_DefaultValue)
            {
                ArearangeSeriesDataLabelsAlign align = Align;
                hashtables.Add("align", Highcharts.FirstCharacterToLower(align.ToString()));
            }
            bool?allowOverlap             = AllowOverlap;
            bool?allowOverlapDefaultValue = AllowOverlap_DefaultValue;

            if ((allowOverlap.GetValueOrDefault() == allowOverlapDefaultValue.GetValueOrDefault()
                                ? allowOverlap.HasValue != allowOverlapDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("allowOverlap", AllowOverlap);
            }
            if (BackgroundColor != BackgroundColor_DefaultValue)
            {
                hashtables.Add("backgroundColor", BackgroundColor);
            }
            if (BorderColor != BorderColor_DefaultValue)
            {
                hashtables.Add("borderColor", BorderColor);
            }
            double?borderRadius             = BorderRadius;
            double?borderRadiusDefaultValue = BorderRadius_DefaultValue;

            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault()
                                ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("borderRadius", BorderRadius);
            }
            borderRadiusDefaultValue = BorderWidth;
            borderRadius             = BorderWidth_DefaultValue;
            if ((borderRadiusDefaultValue.GetValueOrDefault() == borderRadius.GetValueOrDefault()
                                ? borderRadiusDefaultValue.HasValue != borderRadius.HasValue
                                : true))
            {
                hashtables.Add("borderWidth", BorderWidth);
            }
            if (ClassName != ClassName_DefaultValue)
            {
                hashtables.Add("className", ClassName);
            }
            if (Color != Color_DefaultValue)
            {
                hashtables.Add("color", Color);
            }
            allowOverlapDefaultValue = Crop;
            allowOverlap             = Crop_DefaultValue;
            if ((allowOverlapDefaultValue.GetValueOrDefault() == allowOverlap.GetValueOrDefault()
                                ? allowOverlapDefaultValue.HasValue != allowOverlap.HasValue
                                : true))
            {
                hashtables.Add("crop", Crop);
            }
            allowOverlap             = Defer;
            allowOverlapDefaultValue = Defer_DefaultValue;
            if ((allowOverlap.GetValueOrDefault() == allowOverlapDefaultValue.GetValueOrDefault()
                                ? allowOverlap.HasValue != allowOverlapDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("defer", Defer);
            }
            allowOverlapDefaultValue = Enabled;
            allowOverlap             = Enabled_DefaultValue;
            if ((allowOverlapDefaultValue.GetValueOrDefault() == allowOverlap.GetValueOrDefault()
                                ? allowOverlapDefaultValue.HasValue != allowOverlap.HasValue
                                : true))
            {
                hashtables.Add("enabled", Enabled);
            }
            if (Format != Format_DefaultValue)
            {
                hashtables.Add("format", Format);
            }
            if (Formatter != Formatter_DefaultValue)
            {
                hashtables.Add("formatter", Formatter);
                Highcharts.AddFunction("ArearangeSeriesDataLabelsFormatter.formatter", Formatter);
            }
            allowOverlap             = Inside;
            allowOverlapDefaultValue = Inside_DefaultValue;
            if ((allowOverlap.GetValueOrDefault() == allowOverlapDefaultValue.GetValueOrDefault()
                                ? allowOverlap.HasValue != allowOverlapDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("inside", Inside);
            }
            if (Overflow != Overflow_DefaultValue)
            {
                ArearangeSeriesDataLabelsOverflow overflow = Overflow;
                hashtables.Add("overflow", Highcharts.FirstCharacterToLower(overflow.ToString()));
            }
            borderRadius             = Padding;
            borderRadiusDefaultValue = Padding_DefaultValue;
            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault()
                                ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("padding", Padding);
            }
            borderRadiusDefaultValue = Rotation;
            borderRadius             = Rotation_DefaultValue;
            if ((borderRadiusDefaultValue.GetValueOrDefault() == borderRadius.GetValueOrDefault()
                                ? borderRadiusDefaultValue.HasValue != borderRadius.HasValue
                                : true))
            {
                hashtables.Add("rotation", Rotation);
            }
            if (Shadow != Shadow_DefaultValue)
            {
                hashtables.Add("shadow", Shadow);
            }
            if (Shape != Shape_DefaultValue)
            {
                hashtables.Add("shape", Shape);
            }
            if (Style != Style_DefaultValue)
            {
                hashtables.Add("style", Style);
            }
            allowOverlapDefaultValue = UseHTML;
            allowOverlap             = UseHTML_DefaultValue;
            if ((allowOverlapDefaultValue.GetValueOrDefault() == allowOverlap.GetValueOrDefault()
                                ? allowOverlapDefaultValue.HasValue != allowOverlap.HasValue
                                : true))
            {
                hashtables.Add("useHTML", UseHTML);
            }
            if (VerticalAlign != VerticalAlign_DefaultValue)
            {
                ArearangeSeriesDataLabelsVerticalAlign verticalAlign = VerticalAlign;
                hashtables.Add("verticalAlign", Highcharts.FirstCharacterToLower(verticalAlign.ToString()));
            }
            borderRadius             = XHigh;
            borderRadiusDefaultValue = XHigh_DefaultValue;
            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault()
                                ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("xHigh", XHigh);
            }
            borderRadiusDefaultValue = XLow;
            borderRadius             = XLow_DefaultValue;
            if ((borderRadiusDefaultValue.GetValueOrDefault() == borderRadius.GetValueOrDefault()
                                ? borderRadiusDefaultValue.HasValue != borderRadius.HasValue
                                : true))
            {
                hashtables.Add("xLow", XLow);
            }
            borderRadius             = YHigh;
            borderRadiusDefaultValue = YHigh_DefaultValue;
            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault()
                                ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("yHigh", YHigh);
            }
            borderRadiusDefaultValue = YLow;
            borderRadius             = YLow_DefaultValue;
            if ((borderRadiusDefaultValue.GetValueOrDefault() == borderRadius.GetValueOrDefault()
                                ? borderRadiusDefaultValue.HasValue != borderRadius.HasValue
                                : true))
            {
                hashtables.Add("yLow", YLow);
            }
            borderRadius             = ZIndex;
            borderRadiusDefaultValue = ZIndex_DefaultValue;
            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault()
                                ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue
                                : true))
            {
                hashtables.Add("zIndex", ZIndex);
            }
            return(hashtables);
        }