毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> net技术 >> 正文

mschart不能显示曲线上点的数值

更新时间:2013-8-20:  来源:毕业论文

mschart不能显示曲线上点的数值

已经设置了series的IsValueShownAsLabe属性

 #region CHART绘图

                        Series series1 = new Series(model +element );
                        series1.ChartType = SeriesChartType.Spline;
                        series1.BorderWidth = 3;
                        series1.ShadowOffset = 2;

                        // Populate new series with data
                        // series1["ShowMarkerLines"] = "true";
                        //////////////////////////////////////////////////实例2/////////////////////////////////////////////////////
                        //************************************绘图区********************************************
                        //chart 代表整个图片;  legends 代表数据显示标识;  Series 图片中的数据集;  ChartAreas 代表图片中的绘图区(里面能包含多个Series数据集的显示);
                       //图片属性设置
                        chart1.Width = (d1.Length* 25 + 200);    //图片宽度
                        chart1.Height = 400;                      //图片高度
                        chart1.BackColor = Color.Azure;           //图片背景色 
                        //数据集显示属性设置
                        //数据集"出口"显示属性设置
                        series1.ChartType = SeriesChartType.Line;   //数据显示方式 Line:为折线  Spline:曲线
                        series1.Color = Color.Green;                //线条颜色
                        series1.BorderWidth = 2;                    //线条宽度
                        series1.ShadowOffset = 1;                   //阴影宽度
                        series1.IsVisibleInLegend = true;           //是否显示数据说明
                        series1.IsValueShownAsLabel = false;        //线条上是否给吃数据的显示
                        series1.MarkerStyle = MarkerStyle.Circle;   //线条上的数据点标志类型
                        series1.MarkerSize = 8;                     //              标志的大小
 
                        for (int i = 0; i < d1.Length ; i++)      //向数据集绑定数据
                        {
                                series1.Points.AddXY(arraylist [i], d1[i].ToString());  //分别往X,Y轴添加数据(可以为多种类型)    (有多中添加方式)                                
                        }
                        chart1.Series.Add(series1);                 //把数据集添加到chart中

                        Legend legend = new Legend(model + element);
                        chart1.Legends.Add(legend);

                        //作图区的显示属性设置
                        chart1.ChartAreas[0].AxisX.IsMarginVisible = false;
                        chart1.ChartAreas[0].Area3DStyle.Enable3D = false;
                        chart1.AntiAliasing = AntiAliasingStyles.All;
                        chart1.TextAntiAliasingQuality = TextAntiAliasingQuality.High;
                        //背景色设置
                        chart1.ChartAreas[0].ShadowColor = Color.Transparent;
                        chart1.ChartAreas[0].BackColor = Color.AliceBlue  ;         //该处设置为了由天蓝到白色的逐渐变化
                        chart1.ChartAreas[0].BackGradientStyle = GradientStyle.TopBottom;
                        chart1.ChartAreas[0].BackSecondaryColor = Color.White;
                        //X,Y坐标线颜色和大小
                        chart1.ChartAreas[0].AxisX.LineColor = Color.Blue;
                        chart1.ChartAreas[0].AxisY.LineColor = Color.Blue;
                        chart1.ChartAreas[0].AxisX.LineWidth = 2;
                        chart1.ChartAreas[0].AxisX.Title = stationname ;
                        chart1.ChartAreas[0].AxisY.LineWidth = 2;
                        chart1.ChartAreas[0].AxisY.Title = model + element;
                        chart1.ChartAreas[0].AxisX.IsLabelAutoFit = true;
                        //中间X,Y线条的颜色设置
                        chart1.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.Blue;
                        chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Blue;
                        //X.Y轴数据显示间隔
                        chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;  //X轴数据显示间隔
                        chart1.ChartAreas["ChartArea1"].AxisY.Interval = 10;
                        //X轴线条显示间隔
                        chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.Interval = 1;
                        //********************************************************************************************
                        chart1.Series[0].SmartLabelStyle.Enabled = true;
                        chart1.Series[0].SmartLabelStyle.Enabled = true;
                        chart1.Series[0].SmartLabelStyle.AllowOutsidePlotArea = LabelOutsidePlotAreaStyle.Partial;
                        chart1.Series[0].SmartLabelStyle.CalloutLineColor = Color.Red;
                        chart1.Series[0].SmartLabelStyle.CalloutLineWidth = 2;
                        chart1.Series[0].SmartLabelStyle.CalloutStyle = LabelCalloutStyle.Box;
                        chart1.Series[0].IsValueShownAsLabel = false ;
                       
                        #endregion

明明是设的false,怎么显示

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。