none
c#中chart控件如何添加辅助的警示线啊(参考线)? RRS feed

全部回复

  • 你好:

    请问你要添加什么样的线呢?直线还是曲线?规则吗?

    chart控件中可以添加线条的,比如下面的代码就可以添加一条直线:

    chart1.Series.Add("Line");
            chart1.Series["Line"].Points.Add(new DataPoint(1, 1));
            chart1.Series["Line"].Points.Add(new DataPoint(3, 3));
            chart1.Series["Line"].ChartType = SeriesChartType.Line;


    Caillen
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2013年9月23日 6:16
    版主
  • 没法上图只能大概说下,是在已画好的曲线走势图中加7条平行于Y轴的用于参考值的虚线,一条中线,剩下的是+、-偏差值的直线,并在直线的右边标注CL、+1SD、-1SD等等。有实现的方法吗?我现在用StripLines这个参数,但标注没法标到线边上去,有解决方法吗?谢谢
    2013年9月23日 8:07