Graphist User Guide
Graphist graphs are web page images. A graph's image tag src
points at the Graphist software instead of an image file. Parameters added to the Graphist reference include the data points and graph property settings.
Parameters
All parameters are input and optional. They are expressed as key-value pairs. In the following tables, the columns are as follows:
- element: component of graph
- key: code assigned to the element
- data type: expression used for specifying element's value
- example: valid sample of using the parameter
- default: effective value used if the parameter is not stated
- [notes]: miscellaneous commentary below the other items
Data Types
The data types are defined as follows.
code
defined set of valuescolor
decimal RGB values; a list of three integers from 0-255 separated by commasinteger
fixed point numberlist
set of values separated by a specified delimiternumber
integer or floating point valuepercentage
integer from 0-100string
collection of any characters; should be escaped to ensure proper handling
Image
Element | Key | Data Type | Example | Default |
---|---|---|---|---|
image background color | ibgc |
color | ibgc=204,204,204 | 238,238,238 (light gray) |
image height | ih |
integer | ih=300 | 256 |
The desired image height in pixels. This value correlates to the |
||||
image quality | iq |
percentage | iq=50 | 80 |
Particularly significant for JPEG. Ignored for GIF. | ||||
image type | it |
code: - g : GIF- j : JPEG- p : PNG |
it=p | g |
Some image types require use licenses. Graphist does not exempt you from such licensure. | ||||
image width | iw |
integer | iw=400 | 256 |
The desired image width in pixels. This value correlates to the |
Data
Element | Key | Data Type | Example | Default | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data points | ds |
list of lists of numbers | ds=1,2,2,3;1,2.5,2,4 represents two data sets of two data points each: |
[none]
|
||||||||||||||
Data points are paired values where the first item is a point on the x-axis and the second item is a point on the y-axis. Data points and their paired values are delimited by commas. A data set is a collection of points that comprise a single set of measurements. e.g., monthly sales over a year. Multiple data sets can be shown on a graph. Data sets are delimited by semi-colons. If this parameter is omitted or empty, Graphist will reply with a summary of its operating environment, as plain text (not an image). Perhaps the easiest way to use this feature is to point directly at Graphist from the address field of your browser with something like this: http://yourDomain.com/your/install/path/graphist.php |
||||||||||||||||||
data set colors | dsc |
list of colors | dsc=204,204,204;0,0,0 |
|
||||||||||||||
Delimited by semi-colons. If there are more datasets than colors, the colors will be reused in sequence. If this parameter is used, the default colors are overriden in sequence. If fewer colors are specified than are in the default list, the remaining default colors will remain in effect. |
||||||||||||||||||
data set labels | dsl |
list of strings | dsl=2006;2007 | [none] | ||||||||||||||
If this parameter is present and not empty, a legend will be provided. Otherwise a legend will not be provided. Delimited by semi-colons (so semi-colons cannot appear in labels). |
||||||||||||||||||
data set point size | dsp |
list of integers | dsp=5 | all data sets rendered with point size 7 | ||||||||||||||
Use 0 for no points. For bar charts, this is the bar width. Delimited by semi-colons. |
||||||||||||||||||
data set renderings | dsr |
list of codes: - l : line- b : bar |
dsr=b;l | all data sets rendered with lines | ||||||||||||||
Delimited by semi-colons. | ||||||||||||||||||
data set line width | dsw |
list of integers | dsw=9;7 | all data sets rendered with width=1 | ||||||||||||||
Use 0 for no line. Delimited by semi-colons. |
Axes
Options for the x- and y-axes are identical. The asterisk in the keys should be replaced by either the letter x
or y
for the respective axis.
Element | Key | Data Type | Example | Default |
---|---|---|---|---|
axis line color | *ac |
color | xac=102,102,238 | 0,0,0 (black) |
lower bound | *bl |
number | ybl=0 | calculated from data points |
This is the lowest value to be shown on the graph, even if lower values are found in the data. | ||||
upper bound | *bu |
number | xbu=10 | calculated from data points |
This is the highest value to be shown on the graph, even if higher values are found in the data. | ||||
grid line color | *gc |
color | xgc=0,0,0 | 204,204,204 (light gray) |
grid value increment | *gi |
integer | ygi=1 | [none] |
Grid lines will be drawn at integer multiples of this value from the axis. If not zero, takes precedence over *gn. |
||||
number of grid blocks | *gn |
integer | xgn=8 | 10 |
Grid lines will be evenly spaced to create this number of blocks in the plot space. Use 0 for no grid lines relative to this axis. Ignored if *gi is not zero. |
||||
grid line value color | *gvc |
color | ygvc=204,204,204 | 102,102,102 (dark gray) |
Color to use for the values displayed on the grid lines. |
Header and Footer
Options for header and footer are identical. The asterisk in the keys should be replaced by h
or f
for header or footer.
Element | Key | Data Type | Example | Default |
---|---|---|---|---|
background color | *bgc |
color | hbgc=255,255,255 | 102,102,102 (dark gray) |
height | *h |
integer | fh=20 | 0 |
The desired height in pixels, not to exceed one-third the image height. Use 0 for no header/footer. Height reduces the plotting space but does not affect the overall image size. |
||||
text | *t |
string | ht=Hello%20World | [none] |
text color | *tc |
color | ftc=102,102,102 | 238,238,238 (light gray) |
text font size | *tfs |
code: - 1 : small- 2 : large- 3 : large bold |
htfs=3 | 1 |
Values are unique to PHP's image functions. Approximate pixel heights are 8, 12, and 12, respectively. |
Legend
Element | Key | Data Type | Example | Default |
---|---|---|---|---|
legend border color | lbc |
color | lbc=204,204,204 | 102,102,102 (dark gray) |
legend background color | lbgc |
color | lbgc=238,238,238 | 204,204,204 (light gray) |
Clear enough? If not, please let us know via .