none
如何获取dataseries中每个点的Y值 RRS feed

  • 常规讨论

  • WPF中用chart控件
         
                   Dataseries dataSeries0 = new DataSeries();

                    int   numberOfDataPoints = 10;

                     Random random = new Random();/

                    // Loop and add a few DataPoints

                     for (int loopIndex = 0; loopIndex < numberOfDataPoints; loopIndex++)
                     {

                         dataPoint0 = new DataPoint();
                         dataPoint0.YValue = random.Next(-100, 150);//这句话是设置Y值
                         dataSeries0.DataPoints.Add(dataPoint0);
                     }
                    dataSeries0.RenderAs = RenderAs.Line;
                    dataSeries0.Color = new SolidColorBrush(Colors.Blue);            
                    chart.Series.Add(dataSeries0);
                 以上是画折线图程序;
    现在我想:
              在函数 private void Ydownmove( )
                       {
                           这里面求得上面datapoint0每个点的Y值,让它 -1;之后再重新赋值给datapoint0;再重现画线;如何实现?
                       }
    2014年3月5日 9:07

全部回复