Пример #1
0
        internal override Hashtable ToHashtable()
        {
            Hashtable hashtables = new Hashtable();

            if (this.Align != this.Align_DefaultValue)
            {
                YAxisStackLabelsAlign align = this.Align;
                hashtables.Add("align", Highcharts.FirstCharacterToLower(align.ToString()));
            }
            bool?enabled             = this.Enabled;
            bool?enabledDefaultValue = this.Enabled_DefaultValue;

            if ((enabled.GetValueOrDefault() == enabledDefaultValue.GetValueOrDefault() ? enabled.HasValue != enabledDefaultValue.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("YAxisStackLabelsFormatter.formatter", this.Formatter);
            }
            double?rotation             = this.Rotation;
            double?rotationDefaultValue = this.Rotation_DefaultValue;

            if ((rotation.GetValueOrDefault() == rotationDefaultValue.GetValueOrDefault() ? rotation.HasValue != rotationDefaultValue.HasValue : true))
            {
                hashtables.Add("rotation", this.Rotation);
            }
            if (this.Style != this.Style_DefaultValue)
            {
                hashtables.Add("style", this.Style);
            }
            if (this.TextAlign != this.TextAlign_DefaultValue)
            {
                YAxisStackLabelsTextAlign textAlign = this.TextAlign;
                hashtables.Add("textAlign", Highcharts.FirstCharacterToLower(textAlign.ToString()));
            }
            enabledDefaultValue = this.UseHTML;
            enabled             = this.UseHTML_DefaultValue;
            if ((enabledDefaultValue.GetValueOrDefault() == enabled.GetValueOrDefault() ? enabledDefaultValue.HasValue != enabled.HasValue : true))
            {
                hashtables.Add("useHTML", this.UseHTML);
            }
            if (this.VerticalAlign != this.VerticalAlign_DefaultValue)
            {
                YAxisStackLabelsVerticalAlign verticalAlign = this.VerticalAlign;
                hashtables.Add("verticalAlign", Highcharts.FirstCharacterToLower(verticalAlign.ToString()));
            }
            rotationDefaultValue = this.X;
            rotation             = this.X_DefaultValue;
            if ((rotationDefaultValue.GetValueOrDefault() == rotation.GetValueOrDefault() ? rotationDefaultValue.HasValue != rotation.HasValue : true))
            {
                hashtables.Add("x", this.X);
            }
            rotation             = this.Y;
            rotationDefaultValue = this.Y_DefaultValue;
            if ((rotation.GetValueOrDefault() == rotationDefaultValue.GetValueOrDefault() ? rotation.HasValue != rotationDefaultValue.HasValue : true))
            {
                hashtables.Add("y", this.Y);
            }
            return(hashtables);
        }