Deveexpress + WinForm

Time:2020-10-8

Video: https://www.bilibili.com/video/BV15x411x7WN?p=7

The application of chart control.

 

Choose a chart type without considering the superposition of various charts.

 

Bind data and set abscissa and ordinate.

private void XtraForm1_Load(object sender, EventArgs e)
   {
       Series series = this.chartControl1.Series[0];
       DataTable table = new DataTable();
       table.Columns.Add("Class");
       table.Columns.Add("TotalGrade",typeof(double));
       var row = table.NewRow();
       Row ["class"] = class 1;
       row["TotalGrade"] = 5190;
       table.Rows.Add(row);
       var row1 = table.NewRow();
       Row1 ["class"] = class 2;
       row1["TotalGrade"] = 3776;
       table.Rows.Add(row1);

       series.DataSource = table;
       //Set abscissa
       series.ArgumentDataMember = "Class"; 
       //Set ordinate
       series.ValueDataMembers[0] = "TotalGrade";
      
   }

 

Recommended Today

Review of SQL Sever basic command

catalogue preface Installation of virtual machine Commands and operations Basic command syntax Case sensitive SQL keyword and function name Column and Index Names alias Too long to see? Space Database connection Connection of SSMS Connection of command line Database operation establish delete constraint integrity constraint Common constraints NOT NULL UNIQUE PRIMARY KEY FOREIGN KEY DEFAULT […]