오류가 없지만 점에 선을 작성하지 않습니다. 그래프에는 4 점이 있지만 라인은 없습니다.내 C# 차트에 선을 만들 수 없습니다.
private void button4_Click(object sender, EventArgs e)
{
int x1 = Convert.ToInt16(textBox1.Text);
int x2 = Convert.ToInt16(textBox2.Text);
int x3 = Convert.ToInt16(textBox3.Text);
int x4 = Convert.ToInt16(textBox4.Text);
int y1 = Convert.ToInt16(textBox1.Text);
int y2 = Convert.ToInt16(textBox2.Text);
int y3 = Convert.ToInt16(textBox3.Text);
int y4 = Convert.ToInt16(textBox4.Text);
x1 = 15; x2 = 19; x3 = 24; x4 = 29;
this.chart1.Series["HR"].Points.AddXY(x1, y1);
this.chart1.Series["HR"].Points.AddXY(x2, y2);
this.chart1.Series["HR"].Points.AddXY(x3, y3);
this.chart1.Series["HR"].Points.AddXY(x4, y4);
}
public void DrawlinePoint(PaintEventArgs e)
{
//Create pen.
Pen blackPen = new Pen(Color.Black,3);
// Create coordinates of points that define line.
int x1 = 11;
int y1 = 0;
int x4 = 37;
int y4 = 220;
//DrawLine to screen.
e.Graphics.DrawLine(blackPen, x1,y1,x4, y4);
}
도표를 해결하는 데 도움주세요 – jay