⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 实例——实现数据的图表统计.txt

📁 Delphi 7组件应用实例 书籍语言: 简体中文 书籍类型: 程序设计 授权方式: 免费软件 书籍大小: 105 KB
💻 TXT
字号:
dsetStaticData组件的Data属性中录入以下数据:
41, 5, 1, 'John Smith', 'Canada'
34, 3, 2, 'John Smith', 'Canada'
14, 5, 3, 'John Smith', 'Canada'
14, 4, 4, 'John Smith', 'Canada'
12, 7, 5, 'John Smith', 'Canada'
14, 5, 6, 'John Smith', 'Canada'
15, 5, 7, 'John Smith', 'Canada'
16, 5, 8, 'John Smith', 'Canada'
12, 8, 9, 'John Smith', 'Canada'
14, 3, 10, 'John Smith', 'Canada'
51, 3, 11, 'John Smith', 'Canada'
51, 5, 12, 'John Smith', 'Canada'
35, 6, 1, 'Lisa Green', 'Canada'
55, 5, 2, 'Lisa Green', 'Canada'
75, 6, 3, 'Lisa Green', 'Canada'
55, 8, 4, 'Lisa Green', 'Canada'
55, 5, 5, 'Lisa Green', 'Canada'
21, 7, 9, 'Bob Jones', 'United States'
41, 8, 10, 'Bob Jones', 'United States'
11, 9, 11, 'Bob Jones', 'United States'
11, 0, 12, 'Bob Jones', 'United States'
54, 9, 1, 'Jim Crawford', 'Canada'
54, 3, 2, 'Jim Crawford', 'Canada'
54, 4, 3, 'Jim Crawford', 'Canada'
54, 4, 4, 'Jim Crawford', 'Canada'
16, 4, 9, 'David House', 'United States'
16, 3, 10, 'David House', 'United States'
56, 6, 11, 'David House', 'United States'
56, 3, 12, 'David House', 'United States'
53, 3, 1, 'Fernando Hernandez', 'Mexico'
53, 5, 2, 'Fernando Hernandez', 'Mexico'
33, 6, 3, 'Fernando Hernandez', 'Mexico'

unit IWUnit1;
{PUBDIST}

interface

uses
  IWAppForm, IWApplication, IWTypes, Classes, Controls, IWControl,
  IWCompListbox, IWDBStdCtrls, IWCompDynamicChart,
  IWClientSideDatasetDBLink, IWClientSideDatasetBase, IWClientSideDataset,
  IWCompButton, IWCompLabel, IWCompDynamicChartLegend, DB, DBTables;

type
  TformMain = class(TIWAppForm)     
    IWLabel1: TIWLabel;
    IWLabel2: TIWLabel;
    IWLabel3: TIWLabel;
    IWLabel4: TIWLabel;
    IWButton1: TIWButton;
    cmboHorz: TIWComboBox;
    cmboVert: TIWComboBox;
    cmboData: TIWComboBox;
    IWComboBox1: TIWComboBox;
    DemoChart: TIWDynamicChart;
    IWDynamicChartLegend1: TIWDynamicChartLegend;   
    dsetStaticData: TIWClientSideDataset;
    dsetMaster: TIWClientSideDatasetDBLink;
    DataSource1: TDataSource;
    Table1: TTable;
    procedure IWAppFormCreate(Sender: TObject);
    procedure cmboDataChange(Sender: TObject);
  public
  end;

implementation
{$R *.dfm}

uses
  ServerController;

procedure TformMain.IWAppFormCreate(Sender: TObject);
begin
  cmboDataChange(Sender);
end;

procedure TformMain.cmboDataChange(Sender: TObject);
begin
  case cmboData.ItemIndex of
    0: DemoChart.Data := dsetStaticData;
    1: DemoChart.Data := dsetMaster;
  end;
  DemoChart.Data.GetColumnNames(cmboHorz.Items);
  DemoChart.Data.GetColumnNames(cmboVert.Items);
  cmboHorz.ItemIndex := 0;
  DemoChart.HorzData := cmboHorz.Items[0];
  cmboVert.ItemIndex := 0;
  DemoChart.VertData := cmboVert.Items[0];
end;
end.



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -