Create a chart
The specific steps for creating a chart depend on the program you are using to design your Web page. For more information, see Help for that program. If your design program Help does not provide a procedure for creating components such as charts, follow these steps:
- In your design program, open or create the database, project, or Web page that contains the data you want to use in your chart.
- Activate the page where you want to put the chart.
- By using the design program's procedure for adding a control to a Web page, designate the location and initial size of the chart component on the Web page.
- If the Commands and Options dialog box is not displayed, click the chart to display it.
- Specify the data you want to use for the chart in the Data Source tab by selecting Data typed into a data sheet, Data from a database table or query, or Data from the following Web page item.
- If you select Data from the following Web page item, you must also select the Web page item (such as a spreadsheet, PivotTable list, or data source control) you want to use in the list. Only items that exist on the Web page where you're creating the chart will be shown in the list.
- Specify data settings for one of the following:
- Under Set details for the data type, click Data Sheet.
- Select a cell on the data sheet, and then enter the data for each series in cells under each column labeled Series n, or for each category in rows labeled Category n.
- You can enter category or series labels in the first column or first row of the data sheet.
- As you enter data, press ENTER to move down a column or the TAB key to move across columns. Press DELETE to remove data. The rows and columns will automatically expand or contract to accommodate more or less data.
- As you enter data, the chart automatically uses the default column chart type to represent the data.
- If you want to change series to be in rows and categories to be in columns, click By Row-By Column .
Data from a database table or query
- Under Set details for the data type, click Connection.
- Enter a connection string in the Connection box, or click Edit to browse to or enter information for a data source.
- Depending on the design program you are using, clicking Edit displays the Select Data Source dialog box or the Data Link Properties dialog box.
- Locate the data source you want to use in the Look in box, and double-click it in the list.
- If the data source you want to use is not available, click New Source and follow the instructions in the Data Connection Wizard to create a new connection file for your data.
Data Link Properties dialog box
- Enter connection information for your data source on the Connection tab. For help on options, click Help at the bottom of the dialog box.
- Select Data member, table, view, or cube name and select the data member, table, view or cube name from the list or select Command text or SQL and type the connection string you want to use.
- Under Plot details, select whether series should be in rows or columns by clicking Series By Rows/Columns .
- If you want to use direct record values from your data, such as when you have created a query that calculates totals on your server, and you want the chart to use those totals rather than calculate its own totals on the client, select the Plot detail records check box.
- Add data from the field list to the chart drop areas.
- On the chart toolbar, click Field List .
- Use the scroll bars and the expand indicators ( and boxes) to find the field you want to add to the chart.
- Click the field and drag it to the appropriate drop area on the chart: the Drop Series Fields Here area, the Drop Category Fields Here area, the Drop Data Fields Here area, or the Drop Filter Fields Here area.
You can add multiple fields to each location.
Note As an alternative to dragging the field, select the area to which you want to add a field (areas are listed at the bottom of the field list), and then click Add to. If Add to becomes unavailable when you select the area where you want to put the field, the field you selected might not be available for use as a category, series, data, or filter field.
Data from a Web page item: Spreadsheet
- Under Set details for the data type, click Ranges.
- Do one of the following:
Specify all the data at one time
- Under Set ranges in one step, enter the references of the data range you want to chart, separated by a colon (:) in the Data range box. For example, if you want to use data in a continuous range from cell A1 through cell G5 in the spreadsheet, type A1:G5 in the Data range box.
- Next to Series in, click Rows or Columns to specify the location of your series data.
- Click OK.
Specify one series of data at a time
- Under Series, click Add.
- If you want to give the series a descriptive name, replace the default name in the Series name box with the name you want.
- In the Category Labels box, type the cell references to the category labels for that series. For example, if the series you are adding is in row A2:G2, and the category labels are in cells A1 through G1, type A1:G1.
- In the Values box, type the range reference for the values for that series. For example, if the series data is in cells A2 through G2 on the spreadsheet, type A2:G2.
- Repeat for each series of data you want to add.
Data from a Web page item: PivotTable list
- Under Set details for the data type, click Pivot Details.
Because the chart uses the data connected in the PivotTable list, Connection options are not available.
- Under Plot details, select whether series should be in rows or columns by clicking Series By Rows/Columns .
- If you want to use direct record values from your data, such as when you have created a query that calculates totals on your server, and you want the chart to use those totals rather than calculate its own totals on the client, select the Plot detail records check box.
- If you want, you can add, change, or remove fields in the chart by clicking Field list on the chart toolbar.
Data from a Web page item: Data source control
- Under Set details for the data type, click Data Source Details.
- In the Data member, table, view, or cube name list, click the item that contains the data you want to use in your chart.
- Under Plot details, select whether series should be in rows or columns by clicking Series By Rows/By Columns .
- If you want to use direct record values from your data, such as when you have created a query that calculates totals on your server, and you want the chart to use those totals rather than calculate its own totals on the client, select the Plot detail records check box.
- If you want, you can add, change, or remove fields in the chart by clicking Field list on the chart toolbar.
- Click the Type tab, click the type of chart you want to use from the list, and then click the chart sub-type you want to use from the display on the right.
- Click the chart or an item in the chart to make options available in the Commands and Options dialog box. Different options will be displayed in the dialog box depending on what is selected in the chart. For example, when you select the entire chart, the General tab becomes available (in which you can add a legend or data labels, or make other changes based on the chart type). When you select an axis, the Format, Line/Marker, Axis, and Scale tabs are displayed.