DriveWorks Pro 16: Generate Pie Chart [send feedback...]

Generate Pie Chart

This Specification Macro Task will generate an image of a Pie chart. The appearance and data of chart can be configured using the properties in the Task.

The plotting behavior is intended to be the same as plotting a chart in Microsoft Excel.


Mandatory Properties

Properties marked with a red asterisk (*) require a value to be entered.

This is identified on the task and is shown in the table below.

All other properties do not require a value for the task to run successfully.

Property NameDescription
TitleChanges the Title (not the name) of the Task.
Destination *The Full File Path and Name of the image file to create, including its extension.
OverwriteTRUE to overwrite the destination file, otherwise FALSE.
Image Width (px)The pixel width of the image to output.
Image Height (px)The pixel height of the image to output.
Table *A DriveWorks Table of data which will be plotted.

The first column of the Table will be used as the X plot. This column can be filled with text strings.

Every cell on the top row of each column of the Table will be used for series name. These cells be filled with text strings.

Every column thereafter the first will be used as the Y data plot. These cells can only contain numerical values.

Chart Title TextThe text that will be placed above the Chart. Can be left blank if no Title required.
Chart Title FontThe font string for the Chart Title. e.g. font-family: verdana; font-size 14.25pt.
Display LegendTRUE to display the Chart Legend. FALSE will not.
Chart Area BackColorThe color of the Chart Area background. The area in and around the Chart itself. Text, RGB and hex color values are accepted. Defaults to black if blank.
Image BackColorThe color of the Image background. The area not included in the Chart or Legend. Text, RGB or Hexadecimal values accepted. Defaults to black if blank.
Chart Color Theme *The color theme of the Chart itself. Choose from one of the values in the list. See the chart below for examples.
Legend FontThe font used for the Legend.
Title colorThe color to use for the title. text, RGB or Hex values accepted. (Defaults to black if empty)
Display Slice LabelsTRUE to display a Label on each slice. FALSE will not display a Label.
Slice Label FontThe font used for the Slice label/s. Only used if Display Slice Labels enabled. e.g. font-family: verdana: font-size: 14.25pt.
Pie Start AngleThe starting angle of the Pie Chart in degrees. (The default starting angle of 0 is 90° from the 12 O'clock position)
Slices To ExplodeA pipebar delimited list of slices to explode. for example to explode slices one and two enter 1|2. To explode all slices enter only a single asterisk *.
Doughnut Hole SizeThe size of the doughnut hole. 1-99. An input of 0 will result in a Pie Chart. (Defaults to 0 if empty)


When this Task is added the properties are static. To be able to build rules on a static properties see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleExample ResultMeaning
DestinationFsGetFullPath("<Specification>\CreatedChart.png")C:\MyDocuments\Projects\Specifications\Spec 9999\CreateChart.pngThis is the location where the new file will be created.
OverwriteTRUETRUETRUE will overwrite the file if it exists FALSE will not.
Image Width (px)600600This will be the new width in pixels of the image that will be created.
Image Height (px)400400This will be the new height in pixels of the image that will be created.
TableDwLookupGlobalTempatureDwLookupGlobalTempatureThis is the DriveWorks Table to look in for the data to use. This should be set out like the example below.
Chart Title Text"U.S. GDP By Industry" & NewLine() & "Source: Bureau of Economic Analysis"

U.S. GDP By Industry

Source: Bureau of Economic Analysis

This is the Charts name. The NewLine function simply adds the 'Source: NASA' part of the Title onto a new line.
Chart Title Font"font-family: calibri; font-size: 14pt; text-decoration:"font-family: calibri; font-size: 14pt; text-decoration:This is the font used for the Charts Title.
Display LegendFALSEFALSEFALSE will not display the Legend. TRUE would. The Legend will appear on the right side of the new image.
Chart Area BackColor"white"whiteThis is the color of the Chart Area background. The Value can be Text, RGB or Hexadecimal. Blank will default to black.
Image BackColor"white"whiteThis is the color of the Image background. The Value can be Text, RGB or Hexadecimal. Blank will default to black.
Chart Color Theme"EarthTones"EarthTonesEarthTones is one of the options themes that you can pick. Examples of other theme options can be seen below.
Legend Font"font-family: calibri; font-size: 11pt; text-decoration:"font-family: calibri; font-size: 11pt; text-decoration:This is the font to use for the Legend.
Title Color0|0|2550|0|255Will apply the RGB values to the title color.
Display Slice LabelsFALSEFALSEFALSE will not show the Slice Labels. TRUE would.
Slice Label Font"font-family: calibri; font-size: 12pt; text-decoration:"font-family: calibri; font-size: 12pt; text-decoration:This is the font to use for Slice Labels.
Pie Start Angle4545Will start the first slice at 45°
Slices To Explode"2|4"2|4Will explode slices 2 and 4.
Doughnut Hole Size1010Will set the doughnut hole size to be 10.

Example Table Data

The table below is an example of the data in a Simple Table referenced by the Table property above.

Simple Table Name: USEconomy

IndustryGDP value added $ billions 2011
Real estate, renting, leasing1898
State and Local Government1336
Finance and insurance1159
Health/ social care1136

Example Chart Color Theme Property

The table below shows examples of values for the Chart Color Theme property above.

Chart Color ThemeArea ChartColumn ChartLine ChartPie Chart

Table of Contents