Teechart图表教程:XML数据源组件ChartWebSource

 Steema公司和慧都科技针对中国市场联合推出中文版TeeChart for .NET图表控件,一共汉化2000个词条(17000个单词),汉化文档35000个单词,包括控件设计时与运行时的界面汉化以及控件使用向导文档的汉化,总汉化90%以上!

    TeeChart for .NET中文版让您在使用和学习上没有任何语言障碍,至少可以节省30%的开发时间。TeeChart for .NET中文版具有易上手,使用方便,稳定性好,性价比高,价格优惠等优势,并且针对Web应用提供无限制服务器分发授权方式,非常有利于产品集成。点击下载TeeChart for .NET最新试用版    


Teechart组件的应用实例

    Steema为了充分发挥TeeChart页图表组件的功能,将图表编辑器的选项卡进行了拆分,构成独立的可视或非可视组件,由程序设计员根据用户的功能要求进行重新组合,以满足用户需要。

XML数据源组件ChartWebSource

演示:TeeXMLSource组件。

功能:本例通过TeeXMLSource组件,描述XML文件作为图表数据源时的该组件的用法。

设计:

    该组件可在程序设计阶段或运行阶段设置其有关属性,达到与XML文件的连接,采用下列任一种方法都可以。

  1. 在程序设计阶段,打开图表编辑器的Series选项卡的 Data Source选项卡,设定图表的数据源为 XML file,如图1所示。当将 TeeXMLSource的属性设为true时,程序启动后将自动打开XML文件。

    XML数据源时的设定

  2. 在程序设计阶段,从Delphi7的 IDE TeeChart页面将 TeeXMLSource组件拖入窗体,然后单击对象观察窗口Object Inspector的XML属性,打开Strings List Editor串列表编辑窗对话框,用来输入XML语句或命令,如图2所示;或者单击 Code Editor...按钮进入 Delphi7的编辑环境也可以进行XML文件的编辑修改。同样,设置 TeeXMLSource1组件的 Active属性为ture也可以自动打开XML文件。如果在设计阶段没有打开XML文件,在程序运行中可采用下列任一种方式打开:

    TeeXMLSource1.Active:=true;
    TeeXMLSource1.Load;

    串列表编辑器

  3. 该组件不仅可以采用图1或图2显示的设定方式,还可在程序运行阶段采用下列任一种方式访问文件。

  • 用属性FileName设定XML文件名称:

TeeXMLSource1.Chart:=Char1;
TeeXMLSource1.Series: Series1;
TeeXMLSource1.FileName: ='C:\ Example. xml';
TeeXMLSource1.ValueSource:= 'Y';
TeeXMLSource1.Load;
  • 用方法LoadFromURL从Web上读取XML文件:

TeeXMLSource1.Chart:=Chart1;
TeeXMLSource1.Series:=Series1;
TeeXMLSource1.ValueSource:='Y';
TeeXMLSource1.LoadFromYRL('httTp://www.steema.com/SampleData.xmL');
TeeXMLSource1.Active:=true;
  • 用方法LoadFromFile直接读入XML文件:

TeeXMLSource1.Chart : Hartl
TeeXMLSource1.Series : Series1
TeeXMLSource1.ValueSource :='Y':
TeeXMLSource1.LoadFromFile('C:\Documents and Settings\qujh \My
  Documents\ TeeChart使用说明\第2章 TeeChart的组件光盘\\第2章\数据源组件
TeeXMLSource功能\ Example.xml')  //实际运行时可根据.xm1文件的路径设定TeeXMLSource1.Load;

界面:程序设计阶段界面如图3所示。

XML源功能演示设计阶段界面

    下一节我们将会介绍Teechart组件的应用实例:Web数据源组件ChartWebSource。将会有演示,功能和界面三个方面的介绍。如果有对Teechart图表感兴趣的朋友,可以多多关注本教程,并且欢迎在评论区留言。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
=========================== TeeChart Pro v8 VCL / CLX 100% Full Source Code Steema Software SL http://www.steema.com info@steema.com --------------------------- Thank You for Registering TeeChart Pro Source code. The source code can be modified or expanded for your own compiled applications. You can not resell or redistribute in any way this source code as it is or modified. See the License.txt document for complete licensing and disclaimer issues. Recompiling Packages: ---------------------- Kylix: ------ Please follow the installation guidelines found at Kylix.txt file. Borland Developer Studio 2006, Delphi 2005.NET and Delphi 8 for .NET: -------------------------------------- Open the Steema.TeeChart.VCL project group: Steema.TeeChart.VCL.bdsgroup and build all projects. .NET Destination of runtime packages: ------------------------------------- You might optionally want to install TeeChart for VCL.Net assemblies (packages) into .NET Framework "GAC" (Global Assembly Cache): gacutil /i Steema.TeeChart.VCL.dll gacutil /i Steema.TeeChart.VCL.Languages.dll gacutil /i Steema.TeeChart.VCL.Design.dll .NET Installation: ------------------ Under Delphi .NET, go to Component->Installed .NET Components and browse and select the Steema.TeeChart.VCL.Design.dll assembly (design-time package for VCL Forms applications). Delphi / C++ Builder: --------------------- In Delphi and C++ Builder you can recompile the TeeChart Pro packages opening the appropiate Project Group File (*.bpg) BDS 2006: Tee8D10.bpg Delphi 2005: Tee8D9.bpg Delphi 7: Tee8D7.bpg Delphi 6: Tee8D6.bpg Delphi 5: Tee8D5.bpg Delphi 4: Tee8D4.bpg C++ Builder 6: Tee8BCB6.bpg C++ Builder 5: Tee8BCB5.bpg C++ Builder 4: Tee8BCB4.bpg Double-click the first package ( ie: Tee89 ) and select "Project -> Build All packages" to recompile all packages. Please remove old package files and close all projects before recompiling. Destination of runtime packages: -------------------------------- \Windows\System (\WinNT\System32) : Teexx.bpl TeeDBxx.bpl TeeUIxx.bpl TeeGLxx.bpl TeeQRxx.bpl TeeProxx.bpl TeeImagexx.bpl TeeLanguagexx.bpl Installation of packages: -------------------------- Under Delphi / C++ Builder IDE, select Component->Install Packages. Make sure older TeeChart packages are removed from the package list. Select and Add the following design-time packages: For BDS 2006 and Delphi 2005: DclTeeProxx.bpl For all other Delphi and C++Builder versions: DCLTeexx.bpl DCLTQRxx.bpl DCLTeeProxx.bpl DCLTGLxx.bpl and: \Windows\System\TeeImagexx.bpl Installation errors: --------------------- Problems when installing packages in Delphi / C++ Builder arise when old or duplicate *.bpl (*.dpl) files are still located in the system path (\Windows\System or \WinNT\System32). Other causes are: -Improper modification of source code. -Old or duplicate *.DCP or *.DCU or *.OBJ files. Modifications: -------------- If you modify TeeChart Pro source code or fix a bug, you can email us this info so we can apply the same changes for next coming upgrades if they can benefit to other programmers. Support: -------- Please direct your questions to our Support Central Web Site: http://support.steema.com ------------------------------------------------------------- Thanks for TeeCharting ! Steema Software www.steema.com
=============================================== TeeChart Pro v2013 Copyright (c) 1995-2013 by Steema Software All Rights Reserved =============================================== SOFTWARE LICENSING CONTRACT NOTICE TO USER: THIS IS A CONTRACT. BY CLICKING THE 'OK' BUTTON BELOW DURING INSTALLATION, YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. =========================================== License Terms: =============== -- A Single License of TeeChart Pro VCL is per developer. -- A Site License of TeeChart Pro VCL is per "physical place" with unlimited number of developers under the same company building(s). -- For special licensing issues, volume discounts, integrations or redistribution please contact us at: sales@steema.com TeeChart Pro is royalty free under the following use conditions ================================== You can freely distribute TeeChart Pro code COMPILED into your applications as executables or dynamic link libraries, including as OCX ActiveX Controls or ActiveX Forms, excepting compilation as design-time packages or compilation into a DLL or OCX for use in a Web server scripting environment. The latter case requires that a WebServer runtime license be registered per installed server. You are NOT allowed to distribute stand-alone TeeChart Pro files, TeeChart Pro source code, TeeChart Pro manual and help file or everything else contained in this software without receiving our written permission. You are NOT allowed to distribute the TeeChart design-time package files and/or any of the TeeChart *.DCP or any other file from the source code files. You can freely distribute the TeeChart evaluation version, located at our web site http://www.steema.com END-USER LICENSE AGREEMENT FOR STEEMA SOFTWARE SL IMPORTANT- READ CAREFULLY BEFORE INSTALLING THE SOFTWARE. This End User License Agreement (this "EULA") contains the terms and conditions regarding your use of the SOFTWARE (as defined below) and material
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值