deling430

 

int iCol, iRow;
double value;

ChartMain.Series.Clear();
Random rand = new Random((int)DateTime.Now.Ticks);  // 产生随机数

for (iRow = GridMain.FixedRows + 1; iRow < GridMain.Rows; iRow++)
{

Steema.TeeChart.Styles.Line line = new Steema.TeeChart.Styles.Line();  //声明
line.Color = System.Drawing.Color.FromArgb(rand.Next(255), rand.Next(255), rand.Next(255)); ··  //随机线条颜色
line.Pointer.Visible = true;// 坐标点可见
line.Pointer.HorizSize = 2;
line.Pointer.VertSize = 2;
line.Marks.Visible = true;
line.Marks.ArrowLength = 8;  //掐头长度
line.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value;
line.Title = GridMain.get_TextMatrix(iRow, (int)peGridMainKey.MACHINE);  //线条内容
// ChartMain.Series.Add(line);
for (iCol = (int)peGridMainKey.TOTALYIELD; iCol < GridMain.Cols - 1; iCol++)
{
double.TryParse(GridMain.get_TextMatrix(iRow, iCol), out value ); 
line.Add(value, GridMain.get_TextMatrix(0, iCol).ToString());    // 线条的值
}
ChartMain.Series.Add(line); // 向tchart的中添加设置好的线条

}

分类:

技术点:

相关文章:

  • 2021-11-28
  • 2021-10-01
  • 2021-12-30
  • 2021-06-26
  • 2021-08-25
  • 2021-07-02
  • 2021-12-14
猜你喜欢
  • 2021-12-23
  • 2021-07-12
  • 2022-01-06
  • 2021-10-09
  • 2021-10-26
  • 2021-04-17
  • 2021-07-21
相关资源
相似解决方案