コード例 #1
0
        internal Hashtable ToHashtable(JQChart chart)
        {
            Hashtable hashtable = new Hashtable();

            if (this.Align != ChartHorizontalAlign.Center)
            {
                hashtable.Add("align", this.Align.ToString().ToLower());
            }
            if (!string.IsNullOrEmpty(this.Color))
            {
                hashtable.Add("color", this.Color);
            }
            if (this.Enabled)
            {
                hashtable.Add("enabled", true);
            }
            if (!string.IsNullOrEmpty(this.Formatter))
            {
                hashtable.Add("formatter", this.Formatter);
                chart.ReplaceTable.Add(string.Format("\"{0}\":\"{1}\"", "formatter", this.Formatter), string.Format("{0}:{1}", "formatter", this.Formatter));
            }
            if (this.Rotation != 0)
            {
                hashtable.Add("rotation", this.Rotation);
            }
            if (this.X != 0)
            {
                hashtable.Add("x", this.X);
            }
            if (this.Y != -6)
            {
                hashtable.Add("y", this.Y);
            }
            return(hashtable);
        }
コード例 #2
0
ファイル: ChartPoint.cs プロジェクト: zhenghua75/DXInfo
        internal Hashtable ToHashtable(JQChart chart)
        {
            Hashtable hashtable = new Hashtable();

            if (this.X != null)
            {
                hashtable.Add("x", this.X.ToJson(chart));
                hashtable.Add("name", this.X.ToJson(chart));
            }
            if (this.Y != null)
            {
                hashtable.Add("y", this.Y.ToJson(chart));
            }
            if (this.Marker.IsSet())
            {
                hashtable.Add("marker", this.Marker.ToHashtable());
            }
            if (this.Sliced)
            {
                hashtable.Add("sliced", true);
            }
            if (this.Selected)
            {
                hashtable.Add("selected", true);
            }
            if (!string.IsNullOrEmpty(this.Color))
            {
                hashtable.Add("color", this.Color);
            }
            return(hashtable);
        }
コード例 #3
0
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     if (this.Align != ChartHorizontalAlign.Center)
     {
         hashtable.Add("align", this.Align.ToString().ToLower());
     }
     if (!string.IsNullOrEmpty(this.Color))
     {
         hashtable.Add("color", this.Color);
     }
     if (this.Enabled)
     {
         hashtable.Add("enabled", true);
     }
     if (!string.IsNullOrEmpty(this.Formatter))
     {
         hashtable.Add("formatter", this.Formatter);
         chart.ReplaceTable.Add(string.Format("\"{0}\":\"{1}\"", "formatter", this.Formatter), string.Format("{0}:{1}", "formatter", this.Formatter));
     }
     if (this.Rotation != 0)
     {
         hashtable.Add("rotation", this.Rotation);
     }
     if (this.X != 0)
     {
         hashtable.Add("x", this.X);
     }
     if (this.Y != -6)
     {
         hashtable.Add("y", this.Y);
     }
     return hashtable;
 }
コード例 #4
0
        internal Hashtable ToHashtable(JQChart chart)
        {
            Hashtable hashtable = new Hashtable();

            if (!string.IsNullOrEmpty(this.AddSeries))
            {
                hashtable.AddLiteral("addSeries", this.AddSeries, chart);
            }
            if (!string.IsNullOrEmpty(this.Click))
            {
                hashtable.AddLiteral("click", this.Click, chart);
            }
            if (!string.IsNullOrEmpty(this.Load))
            {
                hashtable.AddLiteral("load", this.Load, chart);
            }
            if (!string.IsNullOrEmpty(this.Redraw))
            {
                hashtable.AddLiteral("redraw", this.Redraw, chart);
            }
            if (!string.IsNullOrEmpty(this.Selection))
            {
                hashtable.AddLiteral("selection", this.Selection, chart);
            }
            return(hashtable);
        }
コード例 #5
0
ファイル: ChartPoint.cs プロジェクト: gerasyana/Academy
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     if (this.X != null)
     {
         hashtable.Add("x", this.X.ToJson(chart));
         hashtable.Add("name", this.X.ToJson(chart));
     }
     if (this.Y != null)
     {
         hashtable.Add("y", this.Y.ToJson(chart));
     }
     if (this.Marker.IsSet())
     {
         hashtable.Add("marker", this.Marker.ToHashtable());
     }
     if (this.Sliced)
     {
         hashtable.Add("sliced", true);
     }
     if (this.Selected)
     {
         hashtable.Add("selected", true);
     }
     if (!string.IsNullOrEmpty(this.Color))
     {
         hashtable.Add("color", this.Color);
     }
     return hashtable;
 }
コード例 #6
0
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable h = new Hashtable();
     if (!string.IsNullOrEmpty(this.AddSeries))
     {
         h.AddLiteral("addSeries", this.AddSeries, chart);
     }
     if (!string.IsNullOrEmpty(this.Click))
     {
         h.AddLiteral("click", this.Click, chart);
     }
     if (!string.IsNullOrEmpty(this.Load))
     {
         h.AddLiteral("load", this.Load, chart);
     }
     if (!string.IsNullOrEmpty(this.Redraw))
     {
         h.AddLiteral("redraw", this.Redraw, chart);
     }
     if (!string.IsNullOrEmpty(this.Selection))
     {
         h.AddLiteral("selection", this.Selection, chart);
     }
     return h;
 }
コード例 #7
0
        public MvcHtmlString JQChart(JQChart chart, string id)
        {
            JQChartRenderer jQChartRenderer = new JQChartRenderer(chart);

            chart.ID = id;
            return(MvcHtmlString.Create(jQChartRenderer.RenderHtml()));
        }
コード例 #8
0
ファイル: ObjectExtensions.cs プロジェクト: gerasyana/Academy
 public static object ToJson(this object value, JQChart chart)
 {
     if ((value != null) && (value is DateTime))
     {
         string str = ((DateTime) value).ToJsonUTC();
         chart.AddJsonReplacement(string.Format("\"{0}\"", str), str);
         return str;
     }
     return value;
 }
コード例 #9
0
ファイル: ObjectExtensions.cs プロジェクト: zhenghua75/DXInfo
 public static object ToJson(this object value, JQChart chart)
 {
     if (value != null && value is DateTime)
     {
         string text = ((DateTime)value).ToJsonUTC();
         chart.AddJsonReplacement(string.Format("\"{0}\"", text), text);
         return(text);
     }
     return(value);
 }
コード例 #10
0
        internal Hashtable ToHashtable(JQChart chart)
        {
            Hashtable hashtable = new Hashtable();

            if (!string.IsNullOrEmpty(this.Name))
            {
                hashtable.Add("name", this.Name);
            }
            if (this.Type != ChartType.Line)
            {
                hashtable.Add("type", this.Type.ToString().ToLower());
            }
            if (!string.IsNullOrEmpty(this.Color))
            {
                hashtable.Add("color", this.Color);
            }
            if (this.Marker.IsSet())
            {
                hashtable.Add("marker", this.Marker.ToHashtable());
            }
            if (!string.IsNullOrEmpty(this.Stack))
            {
                hashtable.Add("stack", this.Stack);
            }
            if (this.DataLabels.IsSet(chart))
            {
                hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
            }
            if (!this.Size.IsEmpty)
            {
                if (this.Size.Type != UnitType.Percentage)
                {
                    hashtable.Add("size", this.Size.Value.ToString());
                }
                else
                {
                    hashtable.Add("size", this.Size.ToString());
                }
            }
            if (!this.InnerSize.IsEmpty)
            {
                if (this.InnerSize.Type != UnitType.Percentage)
                {
                    hashtable.Add("innerSize", this.InnerSize.Value.ToString());
                }
                else
                {
                    hashtable.Add("innerSize", this.InnerSize.ToString());
                }
            }
            return(hashtable);
        }
コード例 #11
0
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     hashtable.Add("area", this.Area.ToHashtable(chart));
     hashtable.Add("areaspline", this.AreaSpline.ToHashtable(chart));
     hashtable.Add("bar", this.Bar.ToHashtable(chart));
     hashtable.Add("column", this.Column.ToHashtable(chart));
     hashtable.Add("line", this.Line.ToHashtable(chart));
     hashtable.Add("pie", this.Pie.ToHashtable(chart));
     hashtable.Add("series", this.Series.ToHashtable());
     hashtable.Add("scatter", this.Scatter.ToHashtable(chart));
     hashtable.Add("spline", this.Spline.ToHashtable(chart));
     return hashtable;
 }
コード例 #12
0
        internal Hashtable ToHashtable(JQChart chart)
        {
            return(new Hashtable
            {
                {
                    "area",
                    this.Area.ToHashtable(chart)
                },

                {
                    "areaspline",
                    this.AreaSpline.ToHashtable(chart)
                },

                {
                    "bar",
                    this.Bar.ToHashtable(chart)
                },

                {
                    "column",
                    this.Column.ToHashtable(chart)
                },

                {
                    "line",
                    this.Line.ToHashtable(chart)
                },

                {
                    "pie",
                    this.Pie.ToHashtable(chart)
                },

                {
                    "series",
                    this.Series.ToHashtable()
                },

                {
                    "scatter",
                    this.Scatter.ToHashtable(chart)
                },

                {
                    "spline",
                    this.Spline.ToHashtable(chart)
                }
            });
        }
コード例 #13
0
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     if (!string.IsNullOrEmpty(this.Name))
     {
         hashtable.Add("name", this.Name);
     }
     if (this.Type != ChartType.Line)
     {
         hashtable.Add("type", this.Type.ToString().ToLower());
     }
     if (!string.IsNullOrEmpty(this.Color))
     {
         hashtable.Add("color", this.Color);
     }
     if (this.Marker.IsSet())
     {
         hashtable.Add("marker", this.Marker.ToHashtable());
     }
     if (!string.IsNullOrEmpty(this.Stack))
     {
         hashtable.Add("stack", this.Stack);
     }
     if (this.DataLabels.IsSet(chart))
     {
         hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
     }
     if (!this.Size.IsEmpty)
     {
         if (this.Size.Type != UnitType.Percentage)
         {
             hashtable.Add("size", this.Size.Value.ToString());
         }
         else
         {
             hashtable.Add("size", this.Size.ToString());
         }
     }
     if (!this.InnerSize.IsEmpty)
     {
         if (this.InnerSize.Type != UnitType.Percentage)
         {
             hashtable.Add("innerSize", this.InnerSize.Value.ToString());
             return hashtable;
         }
         hashtable.Add("innerSize", this.InnerSize.ToString());
     }
     return hashtable;
 }
コード例 #14
0
ファイル: ListExtensions.cs プロジェクト: gerasyana/Academy
 public static string ToJSON(this List<ChartYAxisSettings> settings, JQChart chart)
 {
     string str = "";
     int num = 0;
     foreach (ChartYAxisSettings settings2 in settings)
     {
         if (num > 0)
         {
             str = str + ",";
         }
         str = str + settings2.ToJSON(chart);
         num++;
     }
     if (num > 1)
     {
         str = "[" + str + "]";
     }
     return str;
 }
コード例 #15
0
ファイル: ListExtensions.cs プロジェクト: zhenghua75/DXInfo
        public static string ToJSON(this List <ChartXAxisSettings> settings, JQChart chart)
        {
            string text = "";
            int    num  = 0;

            foreach (ChartXAxisSettings current in settings)
            {
                if (num > 0)
                {
                    text += ",";
                }
                text += current.ToJSON(chart);
                num++;
            }
            if (num > 1)
            {
                text = "[" + text + "]";
            }
            return(text);
        }
コード例 #16
0
        internal Hashtable ToHashtable(JQChart chart)
        {
            Hashtable hashtable = new Hashtable();

            if (this.AllowPointSelect)
            {
                hashtable.Add("allowPointSelect", true);
            }
            if (!this.Animation)
            {
                hashtable.Add("animation", false);
            }
            if (!string.IsNullOrEmpty(this.Color))
            {
                hashtable.Add("color", this.Color);
            }
            if (!string.IsNullOrEmpty(this.Cursor))
            {
                hashtable.Add("cursor", this.Cursor);
            }
            if (this.DashStyle != ChartLineDashStyle.Solid)
            {
                hashtable.Add("dashStyle", this.DashStyle.ToString().ToLower());
            }
            hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
            if (!this.EnableMouseTracking)
            {
                hashtable.Add("enableMouseTracking", false);
            }
            if (!string.IsNullOrEmpty(this.ID))
            {
                hashtable.Add("id", this.ID);
            }
            if (this.LineWidth != 2)
            {
                hashtable.Add("lineWidth", 2);
            }
            hashtable.Add("marker", this.Marker.ToHashtable());
            hashtable.Add("markerHover", this.MarkerHover.ToHashtable());
            hashtable.Add("markerSelect", this.MarkerSelect.ToHashtable());
            if (this.PointStart != null)
            {
                hashtable.Add("pointStart", this.PointStart.ToJson(chart));
            }
            if (this.PointInterval != 1)
            {
                hashtable.Add("pointInterval", 1);
            }
            if (this.Selected)
            {
                hashtable.Add("selected", true);
            }
            if (!this.Shadow)
            {
                hashtable.Add("shadow", false);
            }
            if (this.ShowCheckBox)
            {
                hashtable.Add("showCheckBox", true);
            }
            if (!this.ShowInLegend)
            {
                hashtable.Add("showInLegend", false);
            }
            if (this.Stacking != ChartSeriesStacking.None)
            {
                hashtable.Add("stacking", this.Stacking.ToString().ToLower());
            }
            if (!this.StickyTracking)
            {
                hashtable.Add("stickTracking", false);
            }
            if (!this.Visible)
            {
                hashtable.Add("visible", false);
            }
            if (this.ZIndex != 0)
            {
                hashtable.Add("zIndex", this.ZIndex);
            }
            if (!string.IsNullOrEmpty(this.FillColor))
            {
                hashtable.Add("fillColor", this.FillColor);
            }
            else
            {
                if (this.FillGradient.IsSet())
                {
                    hashtable.Add("fillColor", this.FillGradient.ToHashtable());
                }
            }
            if (this.FillOpacity != 0.75)
            {
                hashtable.Add("fillOpacity", this.FillOpacity);
            }
            if (!string.IsNullOrEmpty(this.LineColor))
            {
                hashtable.Add("lineColor", this.LineColor);
            }
            if (this.Threshold != 0.0)
            {
                hashtable.Add("threshold", this.Threshold);
            }
            return(hashtable);
        }
コード例 #17
0
 public static void AddLiteral(this Hashtable h, string key, string value, JQChart chart)
 {
     h.Add(key, value);
     chart.AddJsonReplacement(string.Format("\"{0}\"", value), value);
 }
コード例 #18
0
 internal string ToJSON(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     JavaScriptSerializer serializer = new JavaScriptSerializer();
     if (!this.AllowDecimals)
     {
         hashtable.Add("allowDecimals", false);
     }
     if (!string.IsNullOrEmpty(this.AlternateGridColor))
     {
         hashtable.Add("alternateGridColor", this.AlternateGridColor);
     }
     if (this.Categories.Count > 0)
     {
         hashtable.Add("categories", this.Categories);
     }
     if (this.EndOnTick)
     {
         hashtable.Add("endOnTick", true);
     }
     if (this.GridLineColor != "#C0C0C0")
     {
         hashtable.Add("gridLineColor", this.GridLineColor);
     }
     if (this.GridLineDashStyle != ChartLineDashStyle.ShortDot)
     {
         hashtable.Add("gridLineDashStyle", this.GridLineDashStyle.ToString().ToLower());
     }
     if (this.GridLineWidth != 0)
     {
         hashtable.Add("gridLineWidth", this.GridLineWidth);
     }
     if (!string.IsNullOrEmpty(this.ID))
     {
         hashtable.Add("id", this.ID);
     }
     hashtable.Add("labels", this.Labels.ToHashtable(chart));
     if (this.LineColor != "#C0D0E0")
     {
         hashtable.Add("lineColor", this.LineColor);
     }
     if (this.LineWidth != 1)
     {
         hashtable.Add("lineWidth", this.LineWidth);
     }
     if (this.LinkedTo != 0)
     {
         hashtable.Add("linkedTo", this.LinkedTo);
     }
     if (this.Max != double.PositiveInfinity)
     {
         hashtable.Add("max", this.Max);
     }
     if (this.MaxPadding != 0.01)
     {
         hashtable.Add("maxPadding", this.MaxPadding);
     }
     if (this.MaxZoom != 0)
     {
         hashtable.Add("maxZoom", this.MaxZoom);
     }
     if (this.Min != double.NegativeInfinity)
     {
         hashtable.Add("min", this.Min);
     }
     if (this.MinorGridLineColor != "#E0E0E0")
     {
         hashtable.Add("minorGridLineColor", this.MinorGridLineColor);
     }
     if (this.MinorGridLineWidth != 1)
     {
         hashtable.Add("minorGridLineWidth", this.MinorGridLineWidth);
     }
     if (this.Opposite)
     {
         hashtable.Add("opposite", true);
     }
     if (!this.Reversed)
     {
         hashtable.Add("reversed", false);
     }
     if (!this.ShowFirstLabel)
     {
         hashtable.Add("showFirstLabel", false);
     }
     if (this.ShowLastLabel)
     {
         hashtable.Add("showLastLabel", true);
     }
     hashtable.Add("title", this.Title.ToHashtable());
     if (this.TickInterval.HasValue)
     {
         hashtable.Add("tickInterval", this.TickInterval);
     }
     if (this.TickmarkPlacement != Trirand.Web.Mvc.TickmarkPlacement.Between)
     {
         hashtable.Add("tickmarkPlacement", this.TickmarkPlacement.ToString().ToLower());
     }
     if (this.TickWidth != 1)
     {
         hashtable.Add("tickWidth", this.TickWidth);
     }
     if (this.Type != ChartAxisType.Linear)
     {
         hashtable.Add("type", this.Type.ToString().ToLower());
     }
     return serializer.Serialize(hashtable);
 }
コード例 #19
0
ファイル: ChartBarSettings.cs プロジェクト: gerasyana/Academy
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     if (this.BorderColor != "#FFFFFF")
     {
         hashtable.Add("borderColor", this.BorderColor);
     }
     if (this.BorderRadius != 0)
     {
         hashtable.Add("borderRadius", this.BorderRadius);
     }
     if (this.BorderWidth != 1)
     {
         hashtable.Add("borderWidth", this.BorderWidth);
     }
     if (this.ColorByPoint)
     {
         hashtable.Add("colorByPoint", true);
     }
     if (this.GroupPadding != 0.2)
     {
         hashtable.Add("groupPadding", this.GroupPadding);
     }
     if (this.MinPointLength != 0.0)
     {
         hashtable.Add("minPointLength", this.MinPointLength);
     }
     if (this.PointPadding != 0.1)
     {
         hashtable.Add("pointPadding", this.PointPadding);
     }
     if (this.PointWidth.HasValue)
     {
         hashtable.Add("pointWidth", this.PointWidth);
     }
     if (this.AllowPointSelect)
     {
         hashtable.Add("allowPointSelect", true);
     }
     if (!this.Animation)
     {
         hashtable.Add("animation", false);
     }
     if (!string.IsNullOrEmpty(this.Color))
     {
         hashtable.Add("color", this.Color);
     }
     if (!string.IsNullOrEmpty(this.Cursor))
     {
         hashtable.Add("cursor", this.Cursor);
     }
     if (this.DashStyle != ChartLineDashStyle.Solid)
     {
         hashtable.Add("dashStyle", this.DashStyle.ToString().ToLower());
     }
     hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
     if (!this.EnableMouseTracking)
     {
         hashtable.Add("enableMouseTracking", false);
     }
     if (!string.IsNullOrEmpty(this.ID))
     {
         hashtable.Add("id", this.ID);
     }
     if (this.LineWidth != 2)
     {
         hashtable.Add("lineWidth", 2);
     }
     hashtable.Add("marker", this.Marker.ToHashtable());
     hashtable.Add("markerHover", this.MarkerHover.ToHashtable());
     hashtable.Add("markerSelect", this.MarkerSelect.ToHashtable());
     Hashtable hashtable2 = this.PointClientSideEvents.ToHashtable();
     if (hashtable2.Count > 0)
     {
         Hashtable hashtable3 = new Hashtable();
         Hashtable hashtable4 = new Hashtable();
         hashtable3["point"] = hashtable4;
         hashtable4["events"] = hashtable2;
     }
     if (this.PointStart != null)
     {
         hashtable.Add("pointStart", this.PointStart.ToJson(chart));
     }
     if (this.PointInterval != 1)
     {
         hashtable.Add("pointInterval", 1);
     }
     if (this.Selected)
     {
         hashtable.Add("selected", true);
     }
     if (!this.Shadow)
     {
         hashtable.Add("shadow", false);
     }
     if (this.ShowCheckBox)
     {
         hashtable.Add("showCheckBox", true);
     }
     if (!this.ShowInLegend)
     {
         hashtable.Add("showInLegend", false);
     }
     if (this.Stacking != ChartSeriesStacking.None)
     {
         hashtable.Add("stacking", this.Stacking.ToString().ToLower());
     }
     if (!this.StickyTracking)
     {
         hashtable.Add("stickTracking", false);
     }
     if (!this.Visible)
     {
         hashtable.Add("visible", false);
     }
     if (this.ZIndex != 0)
     {
         hashtable.Add("zIndex", this.ZIndex);
     }
     return hashtable;
 }
コード例 #20
0
ファイル: JQChartRenderer.cs プロジェクト: gerasyana/Academy
 public JQChartRenderer(JQChart chart)
 {
     this._chart = chart;
 }
コード例 #21
0
        internal Hashtable ToHashtable(JQChart chart)
        {
            Hashtable hashtable = new Hashtable();

            if (this.AllowPointSelect)
            {
                hashtable.Add("allowPointSelect", true);
            }
            if (!this.Animation)
            {
                hashtable.Add("animation", false);
            }
            if (!string.IsNullOrEmpty(this.Color))
            {
                hashtable.Add("color", this.Color);
            }
            if (!string.IsNullOrEmpty(this.Cursor))
            {
                hashtable.Add("cursor", this.Cursor);
            }
            if (this.DashStyle != ChartLineDashStyle.Solid)
            {
                hashtable.Add("dashStyle", this.DashStyle.ToString().ToLower());
            }
            hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
            if (!this.EnableMouseTracking)
            {
                hashtable.Add("enableMouseTracking", false);
            }
            if (!string.IsNullOrEmpty(this.ID))
            {
                hashtable.Add("id", this.ID);
            }
            if (this.LineWidth != 2)
            {
                hashtable.Add("lineWidth", 2);
            }
            hashtable.Add("marker", this.Marker.ToHashtable());
            hashtable.Add("markerHover", this.MarkerHover.ToHashtable());
            hashtable.Add("markerSelect", this.MarkerSelect.ToHashtable());
            if (this.PointStart != null)
            {
                hashtable.Add("pointStart", this.PointStart.ToJson(chart));
            }
            if (this.PointInterval != 1)
            {
                hashtable.Add("pointInterval", 1);
            }
            if (this.Selected)
            {
                hashtable.Add("selected", true);
            }
            if (!this.Shadow)
            {
                hashtable.Add("shadow", false);
            }
            if (this.ShowCheckBox)
            {
                hashtable.Add("showCheckBox", true);
            }
            if (!this.ShowInLegend)
            {
                hashtable.Add("showInLegend", false);
            }
            if (this.Stacking != ChartSeriesStacking.None)
            {
                hashtable.Add("stacking", this.Stacking.ToString().ToLower());
            }
            if (!this.StickyTracking)
            {
                hashtable.Add("stickTracking", false);
            }
            if (!this.Visible)
            {
                hashtable.Add("visible", false);
            }
            if (this.ZIndex != 0)
            {
                hashtable.Add("zIndex", this.ZIndex);
            }
            if (this.BorderColor != "#FFFFFF")
            {
                hashtable.Add("borderColor", this.BorderColor);
            }
            if (this.BorderRadius != 0)
            {
                hashtable.Add("borderRadius", this.BorderRadius);
            }
            if (this.BorderWidth != 1)
            {
                hashtable.Add("borderWidth", this.BorderWidth);
            }
            if (this.ColorByPoint)
            {
                hashtable.Add("colorByPoint", true);
            }
            if (this.GroupPadding != 0.2)
            {
                hashtable.Add("groupPadding", this.GroupPadding);
            }
            if (this.MinPointLength != 0)
            {
                hashtable.Add("minPointLength", this.MinPointLength);
            }
            if (this.PointPadding != 0.1)
            {
                hashtable.Add("pointPadding", this.PointPadding);
            }
            return(hashtable);
        }
コード例 #22
0
		internal bool IsSet(JQChart chart)
		{
			return this.ToHashtable(chart).Count > 0;
		}
コード例 #23
0
ファイル: ChartPieSettings.cs プロジェクト: zhenghua75/DXInfo
 internal string ToJSON(JQChart chart)
 {
     return(new JavaScriptSerializer().Serialize(this.ToHashtable(chart)));
 }
コード例 #24
0
        internal string ToJSON(JQChart chart)
        {
            Hashtable            hashtable            = new Hashtable();
            JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();

            if (!this.AllowDecimals)
            {
                hashtable.Add("allowDecimals", false);
            }
            if (!string.IsNullOrEmpty(this.AlternateGridColor))
            {
                hashtable.Add("alternateGridColor", this.AlternateGridColor);
            }
            if (this.Categories.Count > 0)
            {
                hashtable.Add("categories", this.Categories);
            }
            if (this.EndOnTick)
            {
                hashtable.Add("endOnTick", true);
            }
            if (this.GridLineColor != "#C0C0C0")
            {
                hashtable.Add("gridLineColor", this.GridLineColor);
            }
            if (this.GridLineDashStyle != ChartLineDashStyle.ShortDot)
            {
                hashtable.Add("gridLineDashStyle", this.GridLineDashStyle.ToString().ToLower());
            }
            if (this.GridLineWidth != 0)
            {
                hashtable.Add("gridLineWidth", this.GridLineWidth);
            }
            if (!string.IsNullOrEmpty(this.ID))
            {
                hashtable.Add("id", this.ID);
            }
            hashtable.Add("labels", this.Labels.ToHashtable(chart));
            if (this.LineColor != "#C0D0E0")
            {
                hashtable.Add("lineColor", this.LineColor);
            }
            if (this.LineWidth != 1)
            {
                hashtable.Add("lineWidth", this.LineWidth);
            }
            if (this.LinkedTo != 0)
            {
                hashtable.Add("linkedTo", this.LinkedTo);
            }
            if (this.Max != double.PositiveInfinity)
            {
                hashtable.Add("max", this.Max);
            }
            if (this.MaxPadding != 0.01)
            {
                hashtable.Add("maxPadding", this.MaxPadding);
            }
            if (this.MaxZoom != 0)
            {
                hashtable.Add("maxZoom", this.MaxZoom);
            }
            if (this.Min != double.NegativeInfinity)
            {
                hashtable.Add("min", this.Min);
            }
            if (this.MinorGridLineColor != "#E0E0E0")
            {
                hashtable.Add("minorGridLineColor", this.MinorGridLineColor);
            }
            if (this.MinorGridLineWidth != 1)
            {
                hashtable.Add("minorGridLineWidth", this.MinorGridLineWidth);
            }
            if (this.Opposite)
            {
                hashtable.Add("opposite", true);
            }
            if (!this.Reversed)
            {
                hashtable.Add("reversed", false);
            }
            if (!this.ShowFirstLabel)
            {
                hashtable.Add("showFirstLabel", false);
            }
            if (this.ShowLastLabel)
            {
                hashtable.Add("showLastLabel", true);
            }
            hashtable.Add("title", this.Title.ToHashtable());
            if (this.TickInterval.HasValue)
            {
                hashtable.Add("tickInterval", this.TickInterval);
            }
            if (this.TickmarkPlacement != TickmarkPlacement.Between)
            {
                hashtable.Add("tickmarkPlacement", this.TickmarkPlacement.ToString().ToLower());
            }
            if (this.TickWidth != 1)
            {
                hashtable.Add("tickWidth", this.TickWidth);
            }
            if (this.Type != ChartAxisType.Linear)
            {
                hashtable.Add("type", this.Type.ToString().ToLower());
            }
            return(javaScriptSerializer.Serialize(hashtable));
        }
コード例 #25
0
 public JQChartRenderer(JQChart chart)
 {
     this._chart = chart;
 }
コード例 #26
0
 public static void AddLiteral(this Hashtable h, string key, string value, JQChart chart)
 {
     h.Add(key, value);
     chart.AddJsonReplacement(string.Format("\"{0}\"", value), value);
 }
コード例 #27
0
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     if (this.AllowPointSelect)
     {
         hashtable.Add("allowPointSelect", true);
     }
     if (!this.Animation)
     {
         hashtable.Add("animation", false);
     }
     if (!string.IsNullOrEmpty(this.Color))
     {
         hashtable.Add("color", this.Color);
     }
     if (!string.IsNullOrEmpty(this.Cursor))
     {
         hashtable.Add("cursor", this.Cursor);
     }
     if (this.DashStyle != ChartLineDashStyle.Solid)
     {
         hashtable.Add("dashStyle", this.DashStyle.ToString().ToLower());
     }
     hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
     if (!this.EnableMouseTracking)
     {
         hashtable.Add("enableMouseTracking", false);
     }
     if (!string.IsNullOrEmpty(this.ID))
     {
         hashtable.Add("id", this.ID);
     }
     if (this.LineWidth != 2)
     {
         hashtable.Add("lineWidth", 2);
     }
     hashtable.Add("marker", this.Marker.ToHashtable());
     hashtable.Add("markerHover", this.MarkerHover.ToHashtable());
     hashtable.Add("markerSelect", this.MarkerSelect.ToHashtable());
     if (this.PointStart != null)
     {
         hashtable.Add("pointStart", this.PointStart.ToJson(chart));
     }
     if (this.PointInterval != 1)
     {
         hashtable.Add("pointInterval", 1);
     }
     if (this.Selected)
     {
         hashtable.Add("selected", true);
     }
     if (!this.Shadow)
     {
         hashtable.Add("shadow", false);
     }
     if (this.ShowCheckBox)
     {
         hashtable.Add("showCheckBox", true);
     }
     if (!this.ShowInLegend)
     {
         hashtable.Add("showInLegend", false);
     }
     if (this.Stacking != ChartSeriesStacking.None)
     {
         hashtable.Add("stacking", this.Stacking.ToString().ToLower());
     }
     if (!this.StickyTracking)
     {
         hashtable.Add("stickTracking", false);
     }
     if (!this.Visible)
     {
         hashtable.Add("visible", false);
     }
     if (this.ZIndex != 0)
     {
         hashtable.Add("zIndex", this.ZIndex);
     }
     if (!string.IsNullOrEmpty(this.FillColor))
     {
         hashtable.Add("fillColor", this.FillColor);
     }
     else if (this.FillGradient.IsSet())
     {
         hashtable.Add("fillColor", this.FillGradient.ToHashtable());
     }
     if (this.FillOpacity != 0.75)
     {
         hashtable.Add("fillOpacity", this.FillOpacity);
     }
     if (!string.IsNullOrEmpty(this.LineColor))
     {
         hashtable.Add("lineColor", this.LineColor);
     }
     if (this.Threshold != 0.0)
     {
         hashtable.Add("threshold", this.Threshold);
     }
     return hashtable;
 }
コード例 #28
0
 internal string ToJSON(JQChart chart)
 {
     return new JavaScriptSerializer().Serialize(this.ToHashtable(chart));
 }
コード例 #29
0
ファイル: ChartPieSettings.cs プロジェクト: gerasyana/Academy
 internal Hashtable ToHashtable(JQChart chart)
 {
     Hashtable hashtable = new Hashtable();
     if (this.AllowPointSelect)
     {
         hashtable.Add("allowPointSelect", true);
     }
     if (!this.Animation)
     {
         hashtable.Add("animation", false);
     }
     if (!string.IsNullOrEmpty(this.Color))
     {
         hashtable.Add("color", this.Color);
     }
     if (!string.IsNullOrEmpty(this.Cursor))
     {
         hashtable.Add("cursor", this.Cursor);
     }
     if (this.DashStyle != ChartLineDashStyle.Solid)
     {
         hashtable.Add("dashStyle", this.DashStyle.ToString().ToLower());
     }
     hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
     if (!this.EnableMouseTracking)
     {
         hashtable.Add("enableMouseTracking", false);
     }
     if (!string.IsNullOrEmpty(this.ID))
     {
         hashtable.Add("id", this.ID);
     }
     if (this.LineWidth != 2)
     {
         hashtable.Add("lineWidth", 2);
     }
     hashtable.Add("marker", this.Marker.ToHashtable());
     hashtable.Add("markerHover", this.MarkerHover.ToHashtable());
     hashtable.Add("markerSelect", this.MarkerSelect.ToHashtable());
     if (this.PointStart != null)
     {
         hashtable.Add("pointStart", this.PointStart.ToJson(chart));
     }
     if (this.PointInterval != 1)
     {
         hashtable.Add("pointInterval", 1);
     }
     if (this.Selected)
     {
         hashtable.Add("selected", true);
     }
     if (!this.Shadow)
     {
         hashtable.Add("shadow", false);
     }
     if (this.ShowCheckBox)
     {
         hashtable.Add("showCheckBox", true);
     }
     if (!this.ShowInLegend)
     {
         hashtable.Add("showInLegend", false);
     }
     if (this.Stacking != ChartSeriesStacking.None)
     {
         hashtable.Add("stacking", this.Stacking.ToString().ToLower());
     }
     if (!this.StickyTracking)
     {
         hashtable.Add("stickTracking", false);
     }
     if (!this.Visible)
     {
         hashtable.Add("visible", false);
     }
     if (this.ZIndex != 0)
     {
         hashtable.Add("zIndex", this.ZIndex);
     }
     if (this.Size != Unit.Percentage(75.0))
     {
         hashtable.Add("size", this.Size.Value.ToString());
     }
     if (this.SlicedOffset != 10)
     {
         hashtable.Add("slicedOffet", this.SlicedOffset);
     }
     return hashtable;
 }
コード例 #30
0
ファイル: ChartPieSettings.cs プロジェクト: zhenghua75/DXInfo
        internal Hashtable ToHashtable(JQChart chart)
        {
            Hashtable hashtable = new Hashtable();

            if (this.AllowPointSelect)
            {
                hashtable.Add("allowPointSelect", true);
            }
            if (!this.Animation)
            {
                hashtable.Add("animation", false);
            }
            if (!string.IsNullOrEmpty(this.Color))
            {
                hashtable.Add("color", this.Color);
            }
            if (!string.IsNullOrEmpty(this.Cursor))
            {
                hashtable.Add("cursor", this.Cursor);
            }
            if (this.DashStyle != ChartLineDashStyle.Solid)
            {
                hashtable.Add("dashStyle", this.DashStyle.ToString().ToLower());
            }
            hashtable.Add("dataLabels", this.DataLabels.ToHashtable(chart));
            if (!this.EnableMouseTracking)
            {
                hashtable.Add("enableMouseTracking", false);
            }
            if (!string.IsNullOrEmpty(this.ID))
            {
                hashtable.Add("id", this.ID);
            }
            if (this.LineWidth != 2)
            {
                hashtable.Add("lineWidth", 2);
            }
            hashtable.Add("marker", this.Marker.ToHashtable());
            hashtable.Add("markerHover", this.MarkerHover.ToHashtable());
            hashtable.Add("markerSelect", this.MarkerSelect.ToHashtable());
            if (this.PointStart != null)
            {
                hashtable.Add("pointStart", this.PointStart.ToJson(chart));
            }
            if (this.PointInterval != 1)
            {
                hashtable.Add("pointInterval", 1);
            }
            if (this.Selected)
            {
                hashtable.Add("selected", true);
            }
            if (!this.Shadow)
            {
                hashtable.Add("shadow", false);
            }
            if (this.ShowCheckBox)
            {
                hashtable.Add("showCheckBox", true);
            }
            if (!this.ShowInLegend)
            {
                hashtable.Add("showInLegend", false);
            }
            if (this.Stacking != ChartSeriesStacking.None)
            {
                hashtable.Add("stacking", this.Stacking.ToString().ToLower());
            }
            if (!this.StickyTracking)
            {
                hashtable.Add("stickTracking", false);
            }
            if (!this.Visible)
            {
                hashtable.Add("visible", false);
            }
            if (this.ZIndex != 0)
            {
                hashtable.Add("zIndex", this.ZIndex);
            }
            if (this.Size != Unit.Percentage(75.0))
            {
                hashtable.Add("size", this.Size.Value.ToString());
            }
            if (this.SlicedOffset != 10)
            {
                hashtable.Add("slicedOffet", this.SlicedOffset);
            }
            return(hashtable);
        }
コード例 #31
0
 internal bool IsSet(JQChart chart)
 {
     return (this.ToHashtable(chart).Count > 0);
 }