This Specification Macro Task will generate an image of a Column chart. The appearance and data of chart can be configured using the properties of the Task.
The plotting behavior is intended to be the same as plotting a chart in Microsoft Excel.
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 Name | Description |
---|---|
Title | Changes the Title (not the name) of the Task. |
Destination * | The Full File Path and Name of the image file to create, including its extension. |
Overwrite | TRUE 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 Text | The text that will be placed above the Chart. Can be left blank if no Title required. |
Chart Title Font | The font string for the Chart Title. |
Display Legend | TRUE to display the Chart Legend. FALSE will not. |
Chart Area BackColor | The color of the Chart Area background. The area in and around the Chart itself. Text and hex color values are accepted. Defaults to black if blank. |
Image BackColor | The color of the Image background. The area not included in the Chart or legend. Text 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 Font | The font used for the Legend. |
Title color | The color to use for the title. text, RGB or Hex values accepted. (Defaults to black if empty) |
Display X Axis Gridlines | TRUE to display X axis Gridlines. FALSE will not. |
Display Y Axis Gridlines | TRUE to display Y axis Gridlines. FALSE will not. |
Display X Axis Labels | TRUE to display X Axis Labels. FALSE will not. |
Display Y Axis Labels | TRUE to display Y Axis Labels. FALSE will not. |
X Axis Title | The text that will be placed along the X Axis of the Chart. |
Y Axis Title | The text that will be placed along the Y Axis of the Chart. |
X Axis Title Font | The font used for the Y Axis Title. |
Y Axis Title Font | The font used for the Y Axis Title. |
X Axis Label Font | The font used for the X Axis Title. |
Y Axis Label Font | The font used for the Y Axis Title. |
Y Axis Minimum Value | The minimum value for the Y Axis. If set to 0 the Axis will auto-scale. |
Y Axis Maximum Value | The maximum value for the Y Axis. If set to 0 the Axis will auto-scale. |
Gridline Thickness | The thickness of the chart gridlines (both X and Y).
Default is 0 (i.e. no gridlines) When applying a gridline thickness above 0 you must have the Display X (or Y) Axis Gridlines properties enabled. |
Gridline Style | Choose a gridline style from the list (both X and Y).
Options are:
|
Gridline Color | The color of the gridlines. Text, RGB or Hex values accepted (defaults to black if empty)(both X and Y). |
X Interval Rate | The frequency of the X Axis Labels being printed. If set to 0 the interval will auto-scale |
Y Interval Rate | The frequency of the Y Axis Labels being printed. If set to 0 the interval will auto-scale |
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 Name | Example Rule | Example Result | Meaning |
---|---|---|---|
Destination | FsGetFullPath("<Specification>\CreatedChart.png") | C:\MyDocuments\Projects\Specifications\Spec 9999\CreateChart.png | This is the location where the new file will be created. |
Overwrite | TRUE | TRUE | TRUE will overwrite the file if it exists FALSE will not. |
Image Width (px) | 600 | 600 | This will be the new width in pixels of the image that will be created. |
Image Height (px) | 400 | 400 | This will be the new height in pixels of the image that will be created. |
Table | DwLookupGlobalTempature | DwLookupGlobalTempature | This is the DriveWorks Table to look in for the data to use. This should be set out like the example below. |
Chart Title Text | "Average Global Temperatures" & NewLine() & "Source: NASA" | Average Global Temperatures Source: NASA | 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: underline;" | font-family: calibri; font-size: 14pt; text-decoration: underline; | This is the font used for the Charts Title. |
Display Legend | FALSE | FALSE | FALSE will not display the Legend. TRUE would. The Legend will appear on the right side of the new image. |
Chart Area BackColor | "white" | white | This is the color of the Chart Area background. The Value can be Text or Hexadecimal. Blank will default to black. |
Image BackColor | "white" | white | This is the color of the Image background. The Value can be Text or Hexadecimal. Blank will default to black. |
Chart Color Theme | "BrightPastel" | BrightPastel | BrightPastel 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: underline;" | font-family: calibri; font-size: 11pt; text-decoration: underline; | This is the font to use for the Legend. |
Title Color | 0|0|255 | 0|0|255 | Will apply the RGB values to the title color. |
Display X Axis Gridlines | FALSE | FALSE | FALSE will not show the Gridlines. TRUE would. |
Display Y Axis Gridlines | FALSE | FALSE | FALSE will not show the Gridlines. TRUE would. |
Display X Axis Labels | TRUE | TRUE | TRUE will show the X Axis Labels. FALSE would not. |
Display Y Axis Labels | TRUE | TRUE | TRUE will show the Y Axis Labels. FALSE would not. |
X Axis Title | Years | Years | This is the Title of the X Axis. |
Y Axis Title | "Average Temperature °C" | Average Temperature °C | This is the Title of the Y Axis. |
X Axis Title Font | "font-family: calibri; font-size: 11pt;" | font-family: calibri; font-size: 11pt; | This is the font to use for the X Axis Title. |
Y Axis Title Font | "font-family: calibri; font-size: 11pt;" | font-family: calibri; font-size: 11pt; | This is the font to use for the Y Axis Title. |
X Axis Label Font | "font-family: calibri; font-size: 11pt;" | font-family: calibri; font-size: 11pt; | This is the font to use for the X Axis Label. |
Y Axis Label Font | "font-family: calibri; font-size: 11pt;" | font-family: calibri; font-size: 11pt; | This is the font to use for the Y Axis Label. |
Y Axis Minimum Value | 0 | 0 | The minimum value for the Y Axis. As it is set to 0 it will auto-scale. |
Y Axis Maximum Value | 0 | 0 | The maximum value for the Y Axis. As it is set to 0 it will auto-scale. |
Gridline Thickness | 1 | 1 | This will set the line thickness to 1. |
Gridline Style | Solid | Solid | Sets the gridline style to be Solid. |
Gridline Color | "LightGray" | LightGray | Sets the gridline color to LightGray. |
X Interval Rate | 0 | 0 | Will autoscale the X Axis label. |
Y Interval Rate | 0 | 0 | Will autoscale the Y Axis label. |
The table below is an example of the data in a Simple Table referenced by the Table property above.
Simple Table Name: GlobalTemperature
Year | Average Temperature °C |
---|---|
1992 | 0.23 |
1993 | 0.24 |
1994 | 0.32 |
1995 | 0.46 |
1996 | 0.35 |
1997 | 0.48 |
1998 | 0.64 |
1999 | 0.42 |
2000 | 0.42 |
2001 | 0.55 |
2002 | 0.63 |
2003 | 0.62 |
2004 | 0.55 |
2005 | 0.69 |
2006 | 0.63 |
2007 | 0.66 |
2008 | 0.54 |
2009 | 0.64 |
2010 | 0.71 |
2011 | 0.6 |
2012 | 0.63 |
2013 | 0.65 |
2014 | 0.74 |
2015 | 0.87 |
2016 | 0.99 |
2017 | 0.90 |
The table below shows examples of values for the Chart Color Theme property above.
Chart Color Theme | Area Chart | Column Chart | Line Chart | Pie Chart |
---|---|---|---|---|
Berry | ||||
Bright | ||||
BrightPastel | ||||
Chocolate | ||||
EarthTones | ||||
Excel | ||||
Fire | ||||
Grayscale | ||||
Light | ||||
None | ||||
Pastel | ||||
SeaGreen | ||||
SemiTransparent |
This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.
Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.
This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.
Success
Success with Warnings
Failed (one of the following occurred)