Annotations:图表批注集合
ChartAreas:
添加成员ChartArea,
轴Axes
X axis
Y(Value) axis
Title:轴标题
StripLines:自定义条带和线条
TextOreintation:文本方向
Legends:(图表图例)
if (File.Exists(str_tFile))
{
myStream = new FileStream(str_tFile, FileMode.Open, FileAccess.ReadWrite);
myReader = new BinaryReader(myStream);
//while (myReader.PeekChar() > -1)
while (myReader.BaseStream.Position < myReader.BaseStream.Length)
{
chart1.Series["Series1"].Points.AddXY(myReader.ReadUInt16(), myReader.ReadUInt16());
}
myReader.Close();
myStream.Close();
textBox1.Text = chart1.Series["Series1"].Points[chart1.Series["Series1"].Points.Count - 1].YValues[0].ToString();
textBox2.Text = chart1.Series["Series1"].Points[chart1.Series["Series1"].Points.Count - 1].XValue.ToString();
}
else
{
MessageBox.Show("还没有该路的测量记录!", "提示消息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
标签:控件,C#,Series,chart,chart1,Points,Series1,myStream,myReader From: https://www.cnblogs.com/hardenzhao/p/17690853.html