Share via


Understanding the Chart Control

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Chart control is a Microsoft® ActiveX® control that makes it possible for you create a two-dimensional graphical representation of data displayed in a Web page in Microsoft® Internet Explorer 4.01 or later. You get the most complete functionality with this control, and all of the Office Web Component controls, by using Internet Explorer 5 or later.

The Chart control can be bound to a Spreadsheet control, a Data Source control, a PivotTable List control, an ADO recordset, or any ActiveX control that supports data binding. You can bind the chart to a local data source (data stored in the HTML code in the page itself) or to a remote data source (data stored in a Microsoft® Access or Microsoft® SQL Server™ database, for example). As data changes in the data source, the Chart control automatically updates, scales, and sizes itself appropriately.

You can insert a Chart control in a Web page in several ways:

  • In Microsoft® Excel, you can add a Chart control to a Web page by using the Chart wizard to create a chart and then using the Publish as Web Page dialog box to create a Web page that contains the chart.
  • In Access, you can add a chart to a data access page by clicking the Office Chart****tool in the toolbox and then clicking the place on the page where you want the chart to appear. Double clicking the chart space in the data access page displays a dialog, which steps you through the process of connecting the chart to a data source.
  • In Microsoft® FrontPage®, you can add a Chart control to a page by pointing to Component on the Insert menu, and then clicking Office Chart. This inserts an empty Chart control on the page, but unlike in Access, the Office Chart wizard is not launched. To bind the control to data, you use Microsoft® Visual Basic® Scripting Edition (VBScript) code in the Web page.
  • In addition, you can insert a Chart control directly in a Web page by adding an <OBJECT> tag for the control to the page and specifying the control's CLSID as the setting for the CLASSID attribute. Then, you can use Visual Basic for Applications (VBA) or VBScript code to work with the chart programmatically.

The CLSID for the Chart control and all the objects and related methods and properties for the control are documented in the owcvba10.chm Help file.

**Note   **The path to the owcvba10.chm Help file reflects the language ID folder (1033) for U.S. English language support in Office. The language ID folder c:\program files\common files\microsoft shared\web components\10\<langid>differs for each language.

See Also

Using Web Technologies with Office XP | Understanding the Spreadsheet Control | Understanding the Chart Control | Understanding the PivotTable List Control | Understanding the Data Source Control