Chart Director API for APPX
This API can be used by an APPX designer to create business charts within an APPX application.
Known Issues
Overview
Release 5.1.0 of the APPX Utility includes a new designer API which can be used to create charts within an APPX application. This API provides APPX Designers with a robust set of subroutines which can be called to design charts, define datasets, and render charts using datasets. These charts can then be dynamically embedded in APPX menus, input screens, and PDF reports.
Using the API
There are some
key concepts you should understand before using the Chart Design subroutines.
Designing a Chart
Chart design is accomplished by calling the appropriate Chart Design subroutines in the appropriate sequence to create a chart specification.
Defining a Dataset
Datasets are defined by calling the appropriate Dataset Design subroutines in the appropriate sequence to create a dataset definition.
Rendering a Chart
A
chart is rendered by calling the Chart Render subroutine for a chart specification and its associated dataset definition(s).
Base Chart Routines
Base Chart Routines - General
Initialize a chart.
Render the "current" chart.
Set the "current" chart to be a previously initialized chart.
Get the name of the "current" chart.
Set the title of the "current" chart.
Set a Legend Box at the specified X and Y coordinates of the "current" chart.
Base Chart Routines - Background
Set the size (height and width) of the "current" chart.
Set the height of the "current" chart.
Set the width of the "current" chart.
Set the background color of the "current" chart to the "current" color.
Set the pathname of a wallpaper image that is to be tiled within the background area of the "current" chart.
Set the pathname of an image file that is to be positioned within the background area of the "current" chart.
Base Chart Routines - Edge Options
Set the edge color of the "current" chart.
Set the edge effect of the "current" chart.
Set the edge width of the "current" chart. Used in conjunction with Edge Effect.
Base Chart Routines - Corner Options
Set the corner style (Square or Rounded) of the "current" chart.
Set the corner radius' of the "current" chart.
Set the radius of the Top Left corner of the "current" chart.
Set the radius of the Top Right corner of the "current" chart.
Set the radius of the Bottom Right corner of the "current" chart.
Set the radius of the Bottom Left corner of the "current" chart.
Set the exterior color for rounded corners for the "current" chart.
Base Chart Routines - Drop Shadow Options
Set the Drop Shadow Effect to be On or Off for the "current" chart.
Set the Color of the Drop Shadow Effect for the "current" chart.
Set the X and Y coordinates of the offset of the Drop Shadow Effect for the "current" chart.
Set the X coordinate of the offset of the Drop Shadow Effect for the "current" chart.
Set the Y coordinate of the offset of the Drop Shadow Effect for the "current" chart.
Set the Blur Radius of the Drop Shadow Effect for the "current" chart.
Base Chart Routines - Options
Set the Transparency Type for the "current" chart.
Set the Transparency Color for the "Current" chart. This field is usually set in conjunction with the "Single Color" Transparency Type.
Set the Shape Anti-Alias to be On or Off for the "current" chart.
Set the Text Anti-Alias Mode for the "current" chart.
Not Yet Implemented
Add the "current" chart object to the specified Multi-Chart.
Add the specified chart object to the "current" Multi-Chart.
Base Chart Routines - Legend Box
Set the template of the legend text for the "current" Legend Box.
Set the Layout Method for the Legend Keys for the "current" Legend Box.
Set the number of columns to be used with the "Columnar" Key Layout Method for the "current" Legend Box.
Set the key order to be ascending or descending for the "current" Legend Box.
Set the width and height of the legend key icons for the "current" Legend Box.
Set the width of the legend key icons for the "current" Legend Box.
Set the height of the legend key icons for the "current" Legend Box.
Set the distance between the Legend icon and the Legend text.
Set the horizontal gap between two legend entries for horizontal legend layout and the vertical gap (line spacing) between the legend keys for the "current" Legend Box.
Set the horizontal gap between two legend entries for horizontal legend layout for the "current" Legend Box.
Set the vertical gap (line spacing) between the legend keys of the "current" Legend Box.
Set the edge color for the key icons for the "current" Legend Box. Applies only to rectangular icons.
Set the edge effect for the key icons for the "current" Legend Box. Applies only to rectangular icons.
Set the edge width for the key icons for the "current" Legend Box. Used in conjunction with Edge Effect.
Set the key style for the "current" Legend Box.
Base Chart Routines - Legend Box Keys
Add the next legend box key to the "current" Legend Box.
Initialize a legend box key at the specified position for the "current" Legend Box.
Set the line width for a legend key that represents lines in line charts at the specified legend key position for the "current" Legend Box.
Pie Chart Routines
Pie Chart Routines - General
Associate a dataset with the pie chart.
Set the x and y coordinates (horizonal and vertical) of the center of the pie.
Set the x coordinate (horizontal) of the center of the pie.
Set the y coordinate (vertical) of the center of the pie.
Set the radius of the pie.
Pie Chart Routines - 3D View
Set the view of the pie to be 2D or 3D.
Set the 3D mode to be Standard or Shadow.
Set the 3D depth of the pie.
Set the 3D depth for all pie sectors, a range of pie sectors, an individual pie sector or the current pie sector.
Set the 3D viewing angle of the pie.
Pie Chart Routines - Donut Style
Set the shape of the pie to be Standard or Donut.
Set the outer radius of a Donut pie.
Set the inner radius of a Donut pie.
Pie Chart Routines - Sector Layout
Set the starting angle of the first sector in the pie and the layout direction for the pie sectors.
Set the starting angle of the first sector in the pie.
Set the layout direction for the pie sectors.
Pie Chart Routines - Label Options
Set the Top and Bottom bounds for the pie sector labels (Side Label Layout only).
Set the Top bound for the pie sector labels (Side Label Layout only).
Set the Bottom bound for the pie sector labels (Side Label Layout only).
Pie Chart Sector Routines
The following routines can be used to create or initialize pie sector specs and set the various sector style attributes.
Pie Chart Sector Routines - General
Initialize a specific pie sector spec.
Add a next pie chart sector spec for the "current" pie chart and optionally sets the corresponding data value and the corresponding Label.
Set the "current" pie chart sector to be a previously initialized pie sector of the "current" chart.
Pie Chart Sector Routines - Background Options
Set the background color for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.
Set the Shading Method for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.
Pie Chart Sector Routines - Edge Options
Set the Edge Color for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.
Set the Edge Width for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.
Pie Chart Sector Routines - Explode Options
Set the Position (Normal or Exploded) for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.
Set the Explosion Distance for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.
Pie Chart Sector Routines - Labels
The following routines can be used to set the various label attributes for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector.
Set the Label text of an individual pie sector or the "current" pie sector.
Set the Label Layout Method (Inside, Circular, Side) for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector.
Set the Distance between the pie perimeter and the pie sector labels for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector. The Label Distance is usually specified in conjunction with a Label Layout Method. If a Label Distance is specified and a Label Layout Method is not specified, the Circular method is used.
Set the Color of the lines that join the pie sector perimeter with the pie sector labels for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector.
Set the Width of the lines that join the pie sector perimeter with the pie sector labels for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector.
Set the Format for the pie sector labels for all pie sectors, a range of pie sectors, an individual pie sector, or the "current" pie sector.
Not Yet Implemented
The following routines have not been implemented. However, until such time as they are implemented, the corresponding .TEXT routines can be used instead.
Set the font name and font index for all sectors of the current pie chart.
Set the font index for all sectors of the current pie chart.
Set the font style (normal, bold, italic) for all sectors of the current pie chart.
Set the font size for all sectors of the current pie chart.
Set the font color for all sectors of the current pie chart.
Set the rotation angle for all sectors of the current pie chart.
XY Chart Routines
General
Set the position and size of the plot area.
Set the x coordinate of the plot area position.
Set the y coordinate of the plot area position.
Set the width of the plot area.
Set the height of the plot area.
Set the Plot Area background colors.
Set the Plot Area edge color.
Set the Plot Area horizontal grid color.
Set the Plot Area vertical grid color.
Adds a Bar layer to the current chart spec.
Set the color of the bars in the current Data Point, Data Set, Data Group, or XY Bar Layer
Set the color of the bars for the current Data Point
Set the color of the bars for the current Data Set
Set the color of the bars for the current Data Group
Set the color of the bars for the current XY Bar Layer
Set the horizontal gap between the bars or bar groups.
Set the horizontal gap between the bars.
Set the horizontal gap between the bar groups.
Sets the minimum height (or width for horizontal bars) of the bar segments below which data labels will be hidden.
Sets the height and width of the icons used in a legend.
Set the name to be included in the legend box.
Sets the overlap ratio and order among overlapping bars within a bar group in a multi-bar chart
Sets the order among overlapping bars within a bar group in a multi-bar chart
Sets the overlap ratio among overlapping bars within a bar group in a multi-bar chart
Set the shape of the bars in the current Data Point, Data Set, Data Group, or XY Bar Layer
Set the shape of the bars for the current Data Point
Set the shape of the bars for the current Data Set
Set the shape of the bars for the current Data Group
Set the shape of the bars for the current XY Bar Layer
Set the bar and subbar width for the current XY Layer
Set the bar width for the current XY Layer
Set the subbar width for the current XY Layer
Set the 3D depth of the current bar layer
Axis Routines
General
Set the specified axis ("x", "y") of the "current" chart to be the "current" axis. (a second optional parameter can specify "Primary" or "Secondary")
Set the color of the "current" axis.
Set the length of the "current" axis line.
Set the width of the "current" axis line.
Set the margins (top and bottom/left and right) of the "current" axis.
Set the axis mode of the "current" axis to be INDENTED or DEFAULT.
Set the offset (x and y) of the "current" axis.
Set the top extension, bottom extension, and zero affinity values that are to be used when auto-scaling the "current" axis.
Controls whether or not the minimum value of the "current" axis should be rounded to correspond with a tick value.
Controls whether or not the maximum value of the "current" axis should be rounded to correspond with a tick value.
Set the direction for the values of the "current" axis.
Axis Tick Routines
Set the color of the (major and minor) ticks on the "current" axis.
Set the length of the (major and minor) ticks on the "current" axis.
Set the width of the (major and minor) ticks on the "current" axis.
Set the offset of the ticks on the "current" axis.
Set the minimum tick increment of the ticks on the "current" axis.
Set the distance in pixels between major ticks and minor ticks on the "current" axis.
Axis Title Routines
Set a title for the "current" axis.
Set the font name and font index for the title of the "current" Axis.
Set the font index for the title of the "current" axis.
Set the font style (normal, bold, italic) for the title of the "current" axis.
Set the font size for the title of the "current" axis.
Set the font color for the title of the "current" axis.
Set the alignment of the axis title relative to the axis for the "current" axis.
Set the gap between the axis title and the axis for the "current" axis.
Axis Label Routines
Add the next label to the "current" Axis of the "current" chart.
Set the font name and font index for the "current" label of the "current" Axis.
Set the font index for the "current" label of the "current" axis.
Set the font style (normal, bold, italic) for the "current" label of the "current" axis.
Set the font size for the "current" label of the "current" axis.
Set the font color for the "current" label of the "current" axis.
Set the rotation angle for the "current" label of the "current" axis.
Set the Format for the axis labels for the "current" axis.
Set the distance between the axis label and the tick in pixels for the "current" axis.
Set the offset of the labels and the offset units for the the "current" axis. The offset units is an optional second parameter. The default for the offset unit is pixels.
Data Routines
Dataset Routines
Initialize a Dataset.
Set the "current" Dataset to be a previously initialized Dataset.
Get the name of the "current" Dataset.
.LAYER ADD DATA GROUP
Adds a data group to the current chart layer
.LAYER ADD DATASET
Adds a dataset template to the current data group
.LAYER LINK DATASET
Links a set of data points to a dataset template.
Dataset Point Routines
Add a new Point to the "current" Dataset. Also create a corresponding sector spec for the "current" (pie) chart if one does not exist.
Set the value of the "current" Point in the "current" Dataset.
Text Box Routines
General Text Box Routines
Initialize a Text Object
Set the "current" Text Object to be a previously initialized Text Object.
Get the name of the "current" Text Object.
Set the text of the "current" Text Object.
Font Routines
Set the font name and font index for the "current" Text Object.
Set the font index.
Set the font style (normal, bold, italic) for the "current" Text Object.
Set the font size for the "current" Text Object.
Set the height of the font for the "current" Text Object.
Set the width of the font for the "current" Text Object.
Set the font color for the "current" Text Object.
Text Box Routines
Set the background color for the "current" Text Object.
Set the edge color for the "current" Text Object.
Set the edge effect (Flat, Raised, or Depressed) of the "current" Text Object.
Set the edge width of the "current" Text Object.
Set the corner style (Square or Rounded) of the "current" Text Object.
Set the corner radius of the "current" Text Object.
Set the radius of the Top Left corner of the "current" Text Object.
Set the radius of the Top Right corner of the "current" Text Object.
Set the radius of the Bottom Right corner of the "current" Text Object.
Set the radius of the Bottom Left corner of the "current" Text Object.
Set the location (x and y) of the "current" Text Object.
Set the x coordinate of the location of the "current" Text Object.
Set the y coordinate of the location of the "current" Text Object.
Set the size (height and width) of the "current" Text Object.
Set the height of the "current" Text Object.
Set the width of the "current" Text Object.
Set the Z Order of the "current" Text Object.
Text Format Routines
Set the maximum size (width and height) of the text that can be displayed in the "current" Text Object.
Set the maximum width (in pixels) of the text that can be displayed in the "current" Text Object.
Set the maximum height (in lines) of the text that can be displayed in the "current" Text Object.
Set the margins for the text in the "current" Text Object.
Set the Left margin for the text in the "current" Text Object.
Set the Right margin for the text in the "current" Text Object.
Set the Top margin for the text in the "current" Text Object.
Set the Bottom margin for the text in the "current" Text Object.
Set the rotation angle for the text in the "current" Text Object.
Set the alignment of the text in the "current" Text Object.
Set the layout direction of the text(horizontal or Vertical) in the "current" Text Object.
Color Routines
Initialize a Color Object.
Set the "current" Color Object to be a previously initialized Color Object.
Get the name of the "current" Color Object.
Clear the "current" Color Object.
Set the color of the "current" Color Object.
Set the individual colors of the "current" Color Object.
Set the Red value of the "current" Color Object.
Set the Green value of the "current" Color Object.
Set the Blue value of the "current" Color Object.
Set the Alpha value of the "current" Color Object.
Set the alpha channel of the "current" Color Object to be Transparent.
Set the alpha channel of the "current" Color Object to be Opaque.
Set the direction for brightness modulation to create a Metal color effect for the "current" Color Object.
Sets the color of the "current" Color Object to be Yellow (FFEE44) and sets the direction for brightness modulation to create a Gold Metal color effect.
Sets the color of the "current" Color Object to be Grey (DDDDDD) and sets the direction for brightness modulation to create a Silver Metal color effect.
Set the strength of the texture to create a Brushed Metal Effect for the "current" Color Object. Must be None, Light, Medium, or Strong. This routine is usually called in conjunction with .COLOR SET METAL.
Set the brightness of the "current" Color Object.
Set the intensity of the "current" Color Object to be one half of the normal intensity.
Set the dash line pattern for the "current" Color Object.
Shape Routines
Initialize a Shape Object
Set the "current" Shape Object to be a previously initialized Shape Object.
Get the name of the "current" Shape Object.
Clear the "current" Shape Object.
Changes the Shape ID of the "current" Shape Object.
Set the number of sides, points or width for the current shape.
Sets the number of sides, points or width for the current shape.
Sets the number of sides, points or width for the current shape.
Creates a custom shape.
--
SteveFrizzell - 2010-02-14