Exemplo n.º 1
0
        internal override Hashtable ToHashtable()
        {
            Hashtable hashtables = new Hashtable();

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

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

            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault() ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue : true))
            {
                hashtables.Add("borderRadius", this.BorderRadius);
            }
            borderRadiusDefaultValue = this.BorderWidth;
            borderRadius             = this.BorderWidth_DefaultValue;
            if ((borderRadiusDefaultValue.GetValueOrDefault() == borderRadius.GetValueOrDefault() ? borderRadiusDefaultValue.HasValue != borderRadius.HasValue : true))
            {
                hashtables.Add("borderWidth", this.BorderWidth);
            }
            if (this.ClassName != this.ClassName_DefaultValue)
            {
                hashtables.Add("className", this.ClassName);
            }
            if (this.Color != this.Color_DefaultValue)
            {
                hashtables.Add("color", this.Color);
            }
            allowOverlapDefaultValue = this.Crop;
            allowOverlap             = this.Crop_DefaultValue;
            if ((allowOverlapDefaultValue.GetValueOrDefault() == allowOverlap.GetValueOrDefault() ? allowOverlapDefaultValue.HasValue != allowOverlap.HasValue : true))
            {
                hashtables.Add("crop", this.Crop);
            }
            allowOverlap             = this.Defer;
            allowOverlapDefaultValue = this.Defer_DefaultValue;
            if ((allowOverlap.GetValueOrDefault() == allowOverlapDefaultValue.GetValueOrDefault() ? allowOverlap.HasValue != allowOverlapDefaultValue.HasValue : true))
            {
                hashtables.Add("defer", this.Defer);
            }
            allowOverlapDefaultValue = this.Enabled;
            allowOverlap             = this.Enabled_DefaultValue;
            if ((allowOverlapDefaultValue.GetValueOrDefault() == allowOverlap.GetValueOrDefault() ? allowOverlapDefaultValue.HasValue != allowOverlap.HasValue : true))
            {
                hashtables.Add("enabled", this.Enabled);
            }
            if (this.Format != this.Format_DefaultValue)
            {
                hashtables.Add("format", this.Format);
            }
            if (this.Formatter != this.Formatter_DefaultValue)
            {
                hashtables.Add("formatter", this.Formatter);
                Highcharts.AddFunction("AreaSeriesDataLabelsFormatter.formatter", this.Formatter);
            }
            allowOverlap             = this.Inside;
            allowOverlapDefaultValue = this.Inside_DefaultValue;
            if ((allowOverlap.GetValueOrDefault() == allowOverlapDefaultValue.GetValueOrDefault() ? allowOverlap.HasValue != allowOverlapDefaultValue.HasValue : true))
            {
                hashtables.Add("inside", this.Inside);
            }
            if (this.Overflow != this.Overflow_DefaultValue)
            {
                AreaSeriesDataLabelsOverflow overflow = this.Overflow;
                hashtables.Add("overflow", Highcharts.FirstCharacterToLower(overflow.ToString()));
            }
            borderRadius             = this.Padding;
            borderRadiusDefaultValue = this.Padding_DefaultValue;
            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault() ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue : true))
            {
                hashtables.Add("padding", this.Padding);
            }
            borderRadiusDefaultValue = this.Rotation;
            borderRadius             = this.Rotation_DefaultValue;
            if ((borderRadiusDefaultValue.GetValueOrDefault() == borderRadius.GetValueOrDefault() ? borderRadiusDefaultValue.HasValue != borderRadius.HasValue : true))
            {
                hashtables.Add("rotation", this.Rotation);
            }
            if (this.Shadow != this.Shadow_DefaultValue)
            {
                hashtables.Add("shadow", this.Shadow);
            }
            if (this.Shape != this.Shape_DefaultValue)
            {
                hashtables.Add("shape", this.Shape);
            }
            if (this.Style != this.Style_DefaultValue)
            {
                hashtables.Add("style", this.Style);
            }
            allowOverlapDefaultValue = this.UseHTML;
            allowOverlap             = this.UseHTML_DefaultValue;
            if ((allowOverlapDefaultValue.GetValueOrDefault() == allowOverlap.GetValueOrDefault() ? allowOverlapDefaultValue.HasValue != allowOverlap.HasValue : true))
            {
                hashtables.Add("useHTML", this.UseHTML);
            }
            if (this.VerticalAlign != this.VerticalAlign_DefaultValue)
            {
                AreaSeriesDataLabelsVerticalAlign verticalAlign = this.VerticalAlign;
                hashtables.Add("verticalAlign", Highcharts.FirstCharacterToLower(verticalAlign.ToString()));
            }
            borderRadius             = this.X;
            borderRadiusDefaultValue = this.X_DefaultValue;
            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault() ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue : true))
            {
                hashtables.Add("x", this.X);
            }
            borderRadiusDefaultValue = this.Y;
            borderRadius             = this.Y_DefaultValue;
            if ((borderRadiusDefaultValue.GetValueOrDefault() == borderRadius.GetValueOrDefault() ? borderRadiusDefaultValue.HasValue != borderRadius.HasValue : true))
            {
                hashtables.Add("y", this.Y);
            }
            borderRadius             = this.ZIndex;
            borderRadiusDefaultValue = this.ZIndex_DefaultValue;
            if ((borderRadius.GetValueOrDefault() == borderRadiusDefaultValue.GetValueOrDefault() ? borderRadius.HasValue != borderRadiusDefaultValue.HasValue : true))
            {
                hashtables.Add("zIndex", this.ZIndex);
            }
            return(hashtables);
        }