internal string ToJSON()
        {
            Hashtable hashtable = new Hashtable();

            if (this.BackgroundColor != "rgba(255, 255, 255, .85)")
            {
                hashtable.Add("backgroundColor", this.BackgroundColor);
            }
            if (this.BorderColor != "auto")
            {
                hashtable.Add("borderColor", this.BorderColor);
            }
            if (this.BorderRadius != 5)
            {
                hashtable.Add("borderRadius", this.BorderRadius);
            }
            if (this.BorderWidth != 2)
            {
                hashtable.Add("borderWidth", this.BorderWidth);
            }
            ChartCrossHairSettings[] settingsArray = new ChartCrossHairSettings[] { this.XAxisCrossHair, this.YAxisCrossHair };
            hashtable.Add("crosshairs", settingsArray);
            if (!this.Enabled)
            {
                hashtable.Add("enabled", false);
            }
            return(new JavaScriptSerializer().Serialize(hashtable));
        }
Exemple #2
0
 public ChartToolTipSettings()
 {
     this.BackgroundColor = "rgba(255, 255, 255, .85)";
     this.BorderColor     = "auto";
     this.BorderRadius    = 5;
     this.BorderWidth     = 2;
     this.Formatter       = "";
     this.Enabled         = true;
     this.Shared          = false;
     this.XAxisCrossHair  = new ChartCrossHairSettings();
     this.YAxisCrossHair  = new ChartCrossHairSettings();
 }