Beispiel #1
0
        /// <summary>
        /// 画图表
        /// </summary>
        /// <param name="series">系列对象</param>
        /// <param name="entity">系列实体</param>
        private void DrawChart(Series series, SeriesEntity entity)
        {
            series.Name      = entity.name;
            series.ChartType = entity.ChartType;
            series.Color     = entity.Color;
            if (entity.IsMarker)
            {
                series.MarkerSize  = entity.MarkerSize;
                series.MarkerStyle = entity.MarkStyle;
            }
            series.BorderWidth     = entity.BorderWidth;
            series.BorderDashStyle = entity.DashStyle;

            series.XValueType = ChartValueType.DateTime;

            double d = .00;

            //得到Y轴曲线上下限
            foreach (PointEntity point in entity.Points)
            {
                d = double.Parse(point.y.ToString());
                if (d > high)
                {
                    high = d;
                }
                if (d < low)
                {
                    low = d;
                }
            }

            series.Points.DataBind(entity.Points, "x", "y", "");
        }
Beispiel #2
0
        /// <summary>
        /// 画图表
        /// </summary>
        /// <param name="series">系列对象</param>
        /// <param name="entity">系列实体</param>
        private void DrawChart(Series series, SeriesEntity entity)
        {
            series.Name = entity.name;
            series.ChartType = entity.ChartType;
            series.Color = entity.Color;
            if (entity.IsMarker)
            {
                series.MarkerSize = entity.MarkerSize;
                series.MarkerStyle = entity.MarkStyle;
            }
            series.BorderWidth = entity.BorderWidth;
            series.BorderDashStyle = entity.DashStyle;

            series.XValueType = ChartValueType.DateTime;

            double d = .00;
            //得到Y轴曲线上下限
            foreach (PointEntity point in entity.Points)
            {
                d = double.Parse(point.y.ToString());
                if (d > high)
                {
                    high = d;
                }
                if (d < low)
                {
                    low = d;
                }
            }

            series.Points.DataBind(entity.Points, "x", "y", "");
        }