本文介绍了赢形式图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我可能会问错了问题,但我需要的是添加一个指南专线我的窗户形成的图表。换句话说,我有一个简单的数据系列的图表,我需要借鉴的合格分数y轴,或80%的线路。我不想添加第二个系列作为第一个系列有数据点的人数不详。有一个简单的方法来简单地画在y轴上一条线? 下面的虚线就是我拍摄(它不需要箭头) 100 | | 90 | | Ø 80 |<&----------------------- GT; | 70 | ○○ | 60 | Ø | OO 50 | OO | _________________________ 1 2 3 4 5 6 7 8 9 解决方案 尝试添加的带状 例如: VAR系列= chart1.Series [0]; //一系列对象 VAR chartArea = chart1.ChartAreas [series.ChartArea] chartArea.AxisY.StripLines.Add(新带状 { BorderDashStyle = ChartDashStyle.Dash, BORDERCOLOR = Color.DarkBlue,间隔= 10 //这里是您的y值}); I may be asking the wrong question, but what I need is to add a "Guide Line" to my windows form chart. In other words I have a chart with a simple data series and I need to draw a line on the y axis at the passing score, or 80%. I don't want to add a second series as the first series has an undetermined number of data points. Is there a simple way to simply draw one line on the y axis?The dashed line below is what I am shooting for(it does not need the arrows).100| | 90| | o 80|<-----------------------> | 70| o o | 60| o | o o 50|o o |_________________________ 1 2 3 4 5 6 7 8 9 解决方案 Try to add a StripLine For example: var series = chart1.Series[0]; //series objectvar chartArea = chart1.ChartAreas[series.ChartArea];chartArea.AxisY.StripLines.Add(new StripLine { BorderDashStyle = ChartDashStyle.Dash, BorderColor = Color.DarkBlue, Interval = 10//Here is your y value }); 这篇关于赢形式图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-26 15:51