[DevExpress]ChartControl之时间轴示例

  关键代码:

  using System;

  using System.Data;

  using System.Windows.Forms;

  using DevExpress.XtraCharts;

  namespace DevExpressChart

  {

  public partial class winDateTime : Form

  {

  public winDateTime()

  {

  InitializeComponent();

  }

  private void winDateTime_Load(object sender, EventArgs e)

  {

  BuilderDevChart();

  }

  private DataTable CreateChartData()

  {

  DataTable table = new DataTable("Table1");

  table.Columns.Add("Date", typeof(DateTime));

  table.Columns.Add("Value", typeof(Int32));

  table.Rows.Add(new object[] { new DateTime(2014, 5, 21), 10 });

  table.Rows.Add(new object[] { new DateTime(2014, 6, 22), 20 });

  table.Rows.Add(new object[] { new DateTime(2014, 7, 23), 40 });

  table.Rows.Add(new object[] { new DateTime(2014, 8, 24), 20 });

  table.Rows.Add(new object[] { new DateTime(2014, 9, 25), 30

你可能感兴趣的:([DevExpress]ChartControl之时间轴示例)