string dbPath = @"D:\历年高考分数.db";
string sq = @"Data Source=" + dbPath;
m = new SQLiteConnection(sq);
m.Open();
SQLiteDataAdapter mAdapter = new SQLiteDataAdapter("select yxlc,gzl from 曲线三 where gzl=('a'+'b'+'c')",m);
//SQLiteDataAdapter mAdapter = new SQLiteDataAdapter("select yxlc,gzl from 曲线三 where gzl=(a+b+c)", m);
//SQLiteDataAdapter mAdapter = new SQLiteDataAdapter("select yxlc,gzl from 曲线三 where gzl=abc", m);
//SQLiteDataAdapter mAdapter = new SQLiteDataAdapter("select yxlc,gzl from 曲线三 where gzl=a-b-c", m);
DataSet ds = new DataSet();
mAdapter.Fill(ds);
DataTable dt = ds.Tables[0];
//设置图表的数据源
chart1.DataSource = dt;
chart1.Series[0].IsVisibleInLegend = false;//是否显示图例
chart1.Series["Series1"].ChartType = SeriesChartType.Spline;//形状
chart1.Series[0].XValueMember = "yxlc";//X轴数据成员列
chart1.Series[0].YValueMembers = "gzl";//Y轴数据成员列
chart1.DataBind();
chart1.BringToFront();
m.Close();
令a=combox1.text,b=combox2.text,c=combox1.text,
X值取yxlc列。a=CHR1,b=拖车1位,c=1002时,y取CHR111002列;a=CHR1,b=拖车1位,c=1009时,y取CHR111009列;a=CHR1,b=拖车2位,c=1009时,y取CHR121009列;等等(一共125列)
即如何使三个下拉框选好后,gzl列根据选的值取代对应的列