360Works Charts/Documentation

From 360Works Product Documentation Wiki
Jump to: navigation, search

Contents

360Works Charts User Guide

ChartPlugin is a Filemaker Plugin for generating various types of graphical charts. Currently supported are: pie charts, bar charts, line charts, and time series chart.

Before creating a chart, you must register the plugin using chartRegister

The charting API is split into sections corresponding to each type of chart. In general, you call a method to create a chart, then populate data points, set color options, and generate the graphic.

Example Usage

Here is an example for creating a pie chart containing five values. The let() function is used to do the setup for the chart, and then the pieChartShowGraphic is called at the end to set the actual value of the container to the chart image.

Set Variable [ $result = Let(
debug = pieChartCreate( "Quoted Hours Worked" ) and
    pieChartSetDataPoint( Name 1 ; Quoted 1 ) and
    pieChartSetDataPoint( Name 2 ; Quoted 2 ) and
    pieChartSetDataPoint( Name 3 ; Quoted 3 ) and
    pieChartSetDataPoint( Name 4 ; Quoted 4 ) and
    pieChartSetDataPoint( Name 5 ; Quoted 5 );
    pieChartShowGraphic( 360; 360 )
)


Custom parameters

The core charting API deals with the most common tasks. For additional flexibility, you can pass multiple extra parameters to the *ChartShowGraphic functions. The following is a list of all parameters:

legend</dt>
Set this to "false" to hide the legend at the bottom of the chart.</dd>
explodeSeries</dt>
causes one "slice" of a pie chart to appear offset from the center of the chart. The value can be a name or numeric index.</dd>
strokeWidth</dt>
The width of the stroke used to outline the parts of the chart.</dd>
backgroundColor</dt>
The background color of the chart. Pass in three numeric values, e.g. 64,128,255</dd>
plotBackgroundColor</dt>
The background color of the plot area (excluding the headers and legends). Pass in three numeric values, e.g. 64,128,255</dd>
noDataMessage</dt>
The message to display when there is no data to display in the chart</dd>
label</dt>
A template string which is used to generate chart labels. For pie charts, {0} is replace with the item name, {1} is the numeric amount, and {2} is the percent amount.</dd>
outline</dt>
1 or 0 to show/hide a single border around the chart, but within the legend.</dd>
outlines</dt>
1 or 0 to enable/disable outlines around individual chart elements (for pie charts only)</dd>
hideLabels</dt>
Whether to hide labels on the chart (for pie charts only)</dd>
valueAxis.min</dt>
The minimum range to use on the value axis (instead of auto-range)</dd>
valueAxis.max</dt>
The maximum range to use on the value axis (instead of auto-range)</dd>
valueAxis.showTickLabels</dt>
true/false to enable/disable the tick labels in the value axis</dd>
valueAxis.showTickMarks</dt>
true/false to enable/disable the tick marks in the value axi</dd>

To use this, simply pass any number of parameters as key/vaue pairs, for example:

Set Variable [$result = Let(
debug = pieChartCreate( "Quoted Hours Worked" ) and
    pieChartSetDataPoint( Name 1 ; Quoted 1 ) and
    pieChartSetDataPoint( Name 2 ; Quoted 2 ) and
    pieChartSetDataPoint( Name 3 ; Quoted 3 ) and
    pieChartSetDataPoint( Name 4 ; Quoted 4 ) and
    pieChartSetDataPoint( Name 5 ; Quoted 5 )
;
pieChartShowGraphic(
    360 ;
    360 ;
    "explodeSeries=" & Name 1 ; // explode the first series
    "backgroundColor=100,100,255") ; // light-blue background
    "outline=false" // don't show an outline
    "legend=false" // don't show the legend
)
)
]



360Works Plugin Setup Guides

See Plugins_101 for Error reporting, installation, registration, and more.

Function Summary

  • barChartShowGraphic ( width ; height { ; additionalParams... } ) — Generates the bar chart containing all previously set data points.
  • chartLastError — Returns the last error which occurred, or "" if there was no error.
  • chartLicenseInfo — Returns information about the license used.
  • chartParam ( key ; value ) —
  • chartVersion — Returns the version of the plugin.
  • lineChartShowGraphic ( width ; height { ; additionalParams... } ) — Generates the line chart containing all previously set data points.
  • pieChartShowGraphic ( width ; height { ; additionalParams... } ) — Returns the container image for the currently configured chart.
  • timeSeriesChartShowGraphic ( width ; height { ; additionalParams... } ) — Generates the time series chart containing all previously set data points.

Function Detail

barChartShowGraphic ( width ; height { ; additionalParams... } )

Generates the bar chart containing all previously set data points.

See the Custom Parameters section for a list of parameters which this function accepts.

Parameters:

width
the width of the resulting image
height
the height of the resulting image
additionalParams
additional parameters
width

Returns: an image containing the chart of the supplied dimensions.

chartLastError

Returns the last error which occurred, or "" if there was no error.


chartLicenseInfo

Returns information about the license used.


chartParam ( key ; value )

Parameters:


chartVersion

Returns the version of the plugin.

Returns: a decimal version number.

lineChartShowGraphic ( width ; height { ; additionalParams... } )

Generates the line chart containing all previously set data points.


The additionalParams are optional parameters which can be used to customize the chart display.

See the Custom Parameters section for a list of parameters which this function accepts.

Parameters:

width
width
the width of the resulting image
height
the height of the resulting image
additionalParams
additional parameters

Returns: an image containing the chart of the supplied dimensions.

pieChartShowGraphic ( width ; height { ; additionalParams... } )

Returns the container image for the currently configured chart. Note that this also releases any resources used by the chart, so it can only be called once.

The additionalParams are optional parameters which can be used to customize the chart display.

See the Custom Parameters section for a list of parameters which this function accepts.

Parameters:

width
height
additionalParams
additional parameters which customize how the chart is generated

Returns: the chart image

timeSeriesChartShowGraphic ( width ; height { ; additionalParams... } )

Generates the time series chart containing all previously set data points.

The additionalParams are optional parameters which can be used to customize the chart display.

See the Custom Parameters section for a list of parameters which this function accepts.

Parameters:

width
width
the width of the resulting image
height
the height of the resulting image
additionalParams
additional parameters

Returns: an image containing the chart of the supplied dimensions.
Personal tools
Namespaces

Variants
Actions
Plug-in Products
Other Products
Navigation
Toolbox