快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

图表:WebChartControl-创新互联

#region 画统计图
   ///    /// 画统计图
///    private void LoadWebChartControl()
        {
this.WebChartControl1.Series.Clear();
var sql = string.Format("{0} and ({1}) order by TimeTypeValue asc", GetSql_Chart(), string.IsNullOrEmpty(AspxGridViewPagger1.FilterSql) ? "1=1" : AspxGridViewPagger1.FilterSql);
var data = Support.DBHelper.GetDataBySql(sql).ExecuteTable();
            WebChartControl1.Visible= data.Rows.Count >0;
            WebChartControl_Div.Visible= data.Rows.Count > 0;
            List listOrderStatics = new List();
            List listTime = new List();
for (int i = 0; i < data.Rows.Count; i++)
            {
                listOrderStatics.Add(new OrderStatics()
                {
                    ChartName= data.Rows[i]["StaticObjValue"].ToString(),
                    ChartX= data.Rows[i]["TimeTypeValue"].ToString(),
                    ChartY= Tool.StringUnit.ToDecimal(data.Rows[i]["moneY"])
                });
                listTime.Add(data.Rows[i]["TimeTypeValue"].ToString());
            }
            List listStaticObjValue = new List();
            listOrderStatics.ForEach(o=>
            {
if (!listStaticObjValue.Contains(o.ChartName))
                {
                    listStaticObjValue.Add(o.ChartName);
                }
            });
          
foreach (var objValue in listStaticObjValue)
            {
#region MyRegion
  var series_name = string.Empty;
switch (StaObj)
                {
case "SellerID"://业务员                        series_name = GetSellerName(objValue);
break;
case "ShopName"://店铺                        series_name = GetShopCName(objValue);
break;
case "ShippingAgent"://货代                        series_name = objValue;
break;
                }
                Series series= new Series(series_name, ViewType.Line);
                List listOrderStaticsItem = listOrderStatics.Where(z => z.ChartName == objValue).OrderBy(o => o.ChartX).ToList();
foreach (var item in listOrderStaticsItem)
                {
                    series.Points.Add(new SeriesPoint(item.ChartX, item.ChartY));
                }

//设置标题
//  var title = new ChartTitle()
//  WebChartControl1.Titles.Clear();
//WebChartControl1.Titles.Add(title);                series.Label.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;//设置数值显示为百分比
//series.Label.PointOptions.PointView = PointView.ArgumentAndValues;//设置参数值                series.ArgumentScaleType = ScaleType.Auto;//设置x坐标显示类型(Qualitative:定性的)                WebChartControl1.BinaryStorageMode = BinaryStorageMode.Session;
this.WebChartControl1.Series.Add(series);
#endregion
            }
        }
      
#endregion
   

创新互联主营卫东网站建设的网络公司,主营网站建设方案,成都app软件开发公司,卫东h5小程序设计搭建,卫东网站营销推广欢迎卫东等地区企业咨询
网页标题:图表:WebChartControl-创新互联
网站链接:http://6mz.cn/article/cohppp.html

其他资讯