Chart Director API for APPX

This API can be used by an APPX designer to create business charts within an APPX application.


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.

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).

Chart Specifications

Chart Routines - General

.CHART INITIALIZE

Initialize a chart.

.CHART RENDER

Render the "current" chart.

.CHART SET TITLE

Set the title of the "current" chart.

.CHART SET LEGEND BOX

Set a Legend Box at the specified X and Y coordinates of the "current" chart.

.CHART SET SIZE

Set the size (height and width) of the "current" chart.

.CHART SET SIZE:H

Set the height of the "current" chart.

.CHART SET SIZE:W

Set the width of the "current" chart.

.CHART SET BG COLOR

Set the background color of the "current" chart to the "current" color.

.CHART SET BG WALLPAPER

Set the pathname of a wallpaper image that is to be tiled within the background area of the "current" chart.

.CHART SET BG IMAGE

Set the pathname of an image file that is to be positioned within the background area of the "current" chart.

.CHART SET EDGE COLOR

Set the edge color of the "current" chart.

.CHART SET EDGE EFFECT

Set the edge effect of the "current" chart.

.CHART SET EDGE WIDTH

Set the edge width of the "current" chart. Used in conjunction with Edge Effect.

.CHART SET CNR STYLE

Set the corner style (Square or Rounded) of the "current" chart.

.CHART SET EXT CLR

Set the exterior color for rounded corners and/or the Drop Shadow effect of the "current" chart.

.CHART SET CNR R

Set the corner radius' of the "current" chart.

.CHART SET CNR R:TL

Set the radius of the Top Left corner of the "current" chart.

.CHART SET CNR R:TR

Set the radius of the Top Right corner of the "current" chart.

.CHART SET CNR R:BR

Set the radius of the Bottom Right corner of the "current" chart.

.CHART SET CNR R:BL

Set the radius of the Bottom Left corner of the "current" chart.

.CHART SET CURRENT

Set the "current" chart to be a previously initialized chart.

.CHART GET NAME

Get the name of the "current" chart.

Not Yet Implemented

.CHART ADD TO MULTI

Add the "current" chart object to the specified Multi-Chart.

.CHART ADD EM CHART

Add the specified chart object to the "current" Multi-Chart.

.CHART SET SHAPE AA

Set the Shape Anit-Alias to be On or Off for the "current" chart.

.CHART SET TXT AA MODE

Set the Text Anti-Alias Mode for the "current" chart.

.CHART SET TRANS TYPE

Set the Transparency Type for the "current" chart.

.CHART SET TRANS COLOR

Set the Transparency Color for the "Current" chart. This field is usually set in conjunction with the "Single Color" Transparency Type.

.CHART SET DROP SHADOW

Set the Drop Shadow Effect to be On or Off for the "current" chart.

.CHART SET DS LOC

Set the X and Y coordinates of the offset of the Drop Shadow Effect for the "current" chart.

.CHART SET DS LOC:X

Set the X coordinate of the offset of the Drop Shadow Effect for the "current" chart.

.CHART SET DS LOC:Y

Set the Y coordinate of the offset of the Drop Shadow Effect for the "current" chart.

.CHART SET DS BLUR RAD

Set the Blur Radius of the Drop Shadow Effect for the "current" chart.

.CHART SET DS COLOR

Set the Color of the Drop Shadow Effect for the "current" chart.

Legend Box Routines

.LEGEND SET TEMPLATE

Set the template of the legend text for the "current" Legend Box.

.LEGEND SET KEY LAYOUT

Set the Layout Method for the Legend Keys for the "current" Legend Box.

.LEGEND SET KEY COLS

Set the number of columns to be used with the "Columnar" Key Layout Method for the "current" Legend Box.

.LEGEND SET KEY ORDER

Set the key order to be ascending or descending for the "current" Legend Box.

.LEGEND SET ICON SZ

Set the width and height of the legend key icons for the "current" Legend Box.

.LEGEND SET ICON SZ:W

Set the width of the legend key icons for the "current" Legend Box.

.LEGEND SET ICON SZ:H

Set the height fo the legend key icons for the "current" Legend Box.

.LEGEND SET ICON GAP

Set the distance between the Legend icon and the Legend text.

.LEGEND SET KEY GAP

Set the horizontal gap between the key icon and the key text and the vertical gap (line spacing) between the legend keys for the "current" Legend Box.

.LEGEND SET KEY GAP:H

Set the horizontal gap between the key icon and the key text for the "current" Legend Box.

.LEGEND SET KEY GAP:V

Set the vertical gap (line spacing) between the legend keys of the "current" Legend Box.

.LEGEND SET ICON E CLR

Set the edge color for the key icons for the "current" Legend Box. Applies only to rectangular icons.

.LEGEND SET ICON E EFF

Set the edge effect for the key icons for the "current" Legend Box. Applies only to rectangular icons.

.LEGEND SET ICON E W

Set the edge width for the key icons for the "current" Legend Box. Used in conjunction with Edge Effect.

.LEGEND SET KEY STYLE

Set the key style for the "current" Legend Box.

Legend Box Key Routines

.LEGEND KEY ADD NEXT

Add the next legend box key to the "current" Legend Box.

.LEGEND KEY INITIALIZE

Initialize a legend box key at the specified position for the "current" Legend Box.

.LEGEND KEY SET LN W

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

General

.PIE SET DATASET

Associate a dataset with the pie chart.

.PIE SET VIEW

Set the view of the pie to be 2D or 3D.

.PIE SET SHAPE

Set the shape of the pie to be Standard or Donut.

.PIE SET ORIGIN

Set the x and y coordinates (horizonal and vertical) of the center of the pie.

.PIE SET ORIGIN:X

Set the x coordinate (horizontal) of the center of the pie.

.PIE SET ORIGIN:Y

Set the y coordinate (vertical) of the center of the pie.

.PIE SET RADIUS

Set the radius of the pie.

.PIE SET RADIUS:OUTER

Set the outer radius of a Donut pie.

.PIE SET RADIUS:INNER

Set the inner radius of a Donut pie.

.PIE SET 3D MODE

Set the 3D mode to be Standard or Shadow.

.PIE SET 3D DEPTH

Set the 3D depth of the pie.

.PIE SET 3D VIEW ANGLE

Set the 3D viewing angle of the pie.

.PIE SET LAYOUT

Set the starting angle of the first sector in the pie and the layout direction for the pie sectors.

.PIE SET LAYOUT:ANGLE

Set the starting angle of the first sector in the pie.

.PIE SET LAYOUT:DIR

Set the layout direction for the pie sectors.

.PIE SET LBL BOUNDS

Set the Top and Bottom bounds for the pie sector labels (Side Label Layout only).

.PIE SET LBL BOUNDS:T

Set the Top bound for the pie sector labels (Side Label Layout only).

.PIE SET LBL BOUNDS:B

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 SECT INITIALIZE

Initialize a specific pie sector spec.

.PIE SECT ADD NEXT

Add a next pie chart sector spec for the "current" pie chart and optionally sets the corresponding data value and the corresponding Label.

.PIE SECT SET CURRENT

Set the "current" pie chart sector to be a previously initialized pie sector of the "current" chart.

.PIE SET SECT LABEL

Set the Label of an individual pie sector or the "current" sector.

.PIE SET SECT POSITION

Set the Position (Normal or Exploded) for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.

.PIE SET SECT EXP DIST

Set the Explosion Distance for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.

.PIE SET SECT SHADING

Set the Shading Method for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.

.PIE SET SECT EDGE CLR

Set the Edge Color for all pie sectors, a range of pie sectors, an individual pie sector, or the current pie sector.

.PIE SET SECT EDGE W

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 Label Routines

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.

.PIE SET LBL LAYOUT

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.

.PIE SET LBL DISTANCE

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.

.PIE SET LBL JN LN CLR

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.

.PIE SET LBL JN LN W

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.

.PIE SET LBL FORMAT

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.

Data Routines

Dataset Routines

.DATASET INITIALIZE

Initialize a Dataset.

.DATASET SET CURRENT

Set the "current" Dataset to be a previously initialized Dataset.

.DATASET GET NAME

Get the name of the "current" Dataset.

Dataset Point Routines

.POINT ADD NEW

Add a new Point to the "current" Dataset. Also create a corresponding sector spec for the "current" (pie) chart if one does not exist.

.POINT SET VALUE

Set the value of the "current" Point in the "current" Dataset.

Text Box Routines

General Text Box Routines

.TEXT INITIALIZE

Initialize a Text Object

.TEXT SET CURRENT

Set the "current" Text Object to be a previously initialized Text Object.

.TEXT GET NAME

Get the name of the "current" Text Object.

.TEXT SET TEXT

Set the text of the "current" Text Object.

Font Routines

.TEXT SET FONT NAME

Set the font name and font index for the "current" Text Object.

.TEXT SET FONT INDEX

Set the font index.

.TEXT SET FONT STYLE

Set the font style (normal, bold, italic) for the "current" Text Object.

.TEXT SET FONT SZ

Set the font size for the "current" Text Object.

.TEXT SET FONT SZ:H

Set the height of the font for the "current" Text Object.

.TEXT SET FONT SZ:W

Set the width of the font for the "current" Text Object.

.TEXT SET FONT CLR

Set the font color for the "current" Text Object.

Text Box Routines

.TEXT SET BX BG CLR

Set the background color for the "current" Text Object.

.TEXT SET BX EDGE CLR

Set the edge color for the "current" Text Object.

.TEXT SET BX EDGE EFF

Set the edge effect (Flat, Raised, or Depressed) of the "current" Text Object.

.TEXT SET BX EDGE W

Set the edge width of the "current" Text Object.

.TEXT SET BX CNR STYLE

Set the corner style (Square or Rounded) of the "current" Text Object.

.TEXT SET BX CNR R

Set the corner radius' of the "current" Text Object.

.TEXT SET BX CNR R:TL

Set the radius of the Top Left corner of the "current" Text Object.

.TEXT SET BX CNR R:TR

Set the radius of the Top Right corner of the "current" Text Object.

.TEXT SET BX CNR R:BR

Set the radius of the Bottom Right corner of the "current" Text Object.

.TEXT SET BX CNR R:BL

Set the radius of the Bottom Left corner of the "current" Text Object.

.TEXT SET BX LOC

Set the location (x and y) of the "current" Text Object.

.TEXT SET BX LOC:X

Set the x coordinate of the location of the "current" Text Object.

.TEXT SET BX LOC:Y

Set the y coordinate of the location of the "current" Text Object.

.TEXT SET BX SZ

Set the size (height and width) of the "current" Text Object.

.TEXT SET BX SZ:H

Set the height of the "current" Text Object.

.TEXT SET BX SZ:W

Set the width of the "current" Text Object.

.TEXT SET BX Z ORDER

Set the Z Order of the "current" Text Object.

Text Format Routines

.TEXT SET TXT MAX SZ

Set the maximum size (width and height) of the text that can be displayed in the "current" Text Object.

.TEXT SET TXT MAX SZ:W

Set the maximum width (in pixels) of the text that can be displayed in the "current" Text Object.

.TEXT SET TXT MAX SZ:H

Set the maximum height (in lines) of the text that can be displayed in the "current" Text Object.

.TEXT SET TXT MARGIN

Set the margins for the text in the "current" Text Object.

.TEXT SET TXT MARGIN:L

Set the Left margin for the text in the "current" Text Object.

.TEXT SET TXT MARGIN:R

Set the Right margin for the text in the "current" Text Object.

.TEXT SET TXT MARGIN:T

Set the Top margin for the text in the "current" Text Object.

.TEXT SET TXT MARGIN:B

Set the Bottom margin for the text in the "current" Text Object.

.TEXT SET TXT ROTATION

Set the rotation angle for the text in the "current" Text Object.

.TEXT SET TXT ALIGN

Set the alignment of the text in the "current" Text Object.

.TEXT SET TXT LAYOUT

Set the layout direction of the text(horizontal or Vertical) in the "current" Text Object.

Color Routines

.COLOR INITIALIZE

Initialize a Color Object.

.COLOR SET CURRENT

Set the "current" Color Object to be a previously initialized Color Object.

.COLOR GET NAME

Get the name of the "current" Color Object.

.COLOR SET DEFAULT

Clear the "current" Color Object.

.COLOR SET COLOR

Set the color of the "current" Color Object.

.COLOR SET COLOR:RGB

Set the individual colors of the "current" Color Object.

.COLOR SET COLOR:R

Set the Red value of the "current" Color Object.

.COLOR SET COLOR:G

Set the Green value of the "current" Color Object.

.COLOR SET COLOR:B

Set the Blue value of the "current" Color Object.

.COLOR SET COLOR:A

Set the Alpha value of the "current" Color Object.

.COLOR SET TRANSPARENT

Set the alpha channel of the "current" Color Object to be Transparent.

.COLOR SET OPAQUE

Set the alpha channel of the "current" Color Object to be Opaque.

-- SteveFrizzell - 2010-02-14

Edit | Attach | Watch | Print version | History: r114 | r40 < r39 < r38 < r37 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r38 - 2010-04-22 - SteveFrizzell
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback