回复 1楼chinaxiaokang的帖子
问题一:
给 Chart 绑定数据源的代码如下,
可以参考
1.帮助文档 chartdata 章节:
2.Demo 路径:\Documents\GrapeCity\ActiveReports 6\Samples\CSharp\Charting
- // create the series
- DataDynamics.ActiveReports.Chart.Series s = new DataDynamics.ActiveReports.Chart.Series();
- string m_cnnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Northwind.mdb;Persist Security Info=False";
- System.Data.OleDb.OleDbConnection m_cnn = new System.Data.OleDb.OleDbConnection(m_cnnString);
- System.Data.OleDb.OleDbDataAdapter oDBAdapter;
-
- // create the dataset
- System.Data.DataSet oDS;
- oDBAdapter = new System.Data.OleDb.OleDbDataAdapter("SELECT * from Orders WHERE OrderDate < #08/17/1994#", m_cnnString);
- oDS = new System.Data.DataSet();
- oDBAdapter.Fill(oDS, "Orders");
-
- // set the DataSource, ValueMembersY, and ValueMembersX properties
- this.chartControl1.DataSource = oDS;
- this.chartControl1.Series.Add(s);
- this.chartControl1.Series[0].ValueMembersY = oDS.Tables["Orders"].Columns[7].ColumnName;
- this.chartControl1.Series[0].ValueMemberX = oDS.Tables["Orders"].Columns[8].ColumnName;
复制代码
问题二:无法支持放大局部区域功能。 |