[owtchart-users] OWTCHART

Daniel Morissette morissette@dmsolutions.ca
Thu, 31 Oct 2002 10:22:28 -0500


Ualfrido Del Carlo Jr wrote:
> 
> I?m using the owtchart program and I would like to know if I can make legends for the charts.
> 

There is no automated way to produce a chart legend, but you can produce
one in HTML yourself using your scripting language at the same time as
you build the chart URL.

See the charts produced by the following site for an example:
  http://cythera.ic.gc.ca/dsol/cvd/c_age1_e.html

The legend icons are produced by a utility called 'gifsample', and I
added it to the owtchart-1.1.0-win32.zip download on the owtchart
website a few minutes ago.  This utility can produce solid color icons,
as well as fancy line samples or patterns.  

e.g.
 http://www2.dmsolutions.ca/cgi-bin/gifsample/35/15?Color=0000FF
 http://www2.dmsolutions.ca/cgi-bin/gifsample/35/15?LineWidth=2&Color=FF0000

I attached some basic docs below.

Daniel
-- 
------------------------------------------------------------
 Daniel Morissette               morissette@dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------


 *  Return a rectangular GIF color sample.
 *
 *  The parameters for the color sample to return are taken from the 
 *  PATH_INFO:
 *
 *  /cgi-bin/gifsample/<width>/<height>/<R>/<G>/<B>
 *
 * /<R>/<G>/<B> are optional and behave the same way as the Color parameter
 *
 * Optional QUERY_STRING params:
 *
 * The default behavior with only the PATH_INFO parameters above is to 
 * generate a solid color sample.  The following QUERY_STRING parameters
 * are optional can be used to generate other types of symbology:
 *
 * LineStyle - The sample will be a single line, using the specified
 *             pattern.  The pattern is a string in which spaces 
 *             correspond to transparent pixels, and any other character
 *             will draw a pixel of the sample's color.
 *             Passing an empty LineStyle value will draw a solid line.
 *             Also note that spaces are invalid in a URL and have to be
 *             replaced with the '+' character.
 *             eg. "..&LineStyle=xxxx++++&..."
 * LineWidth - Width of the line sample in pixels (default is 1 pixel)
 * LineType  - There is 3 types of line : ZigZag, Hatch, Line.
 *             Default is Line. All the type are influenced by 
 *             LineStyle and LineWidth.
 * HatchType - Type of hatch (Default is 1):
 *             1 : Slash
 *             2 : Backslash
 *             3 : Horizontal
 *             4 : Vertical
 *             5 : XXXXX
 *             6 : +++++
 * HatchSpacing - Space between line in pixels in the Hatch type (default = 4)
 * SymbolID  - Type of symbol (no default): 
 *             1 : square
 *             2 : circle
 *             3 : triangle
 *             4 : plus (+)
 *             5 : star
 *             6 : dot (filled circle)
 * SymbolSize- Size of the symbol called by SymbolID (in pixels).
 *             The biggest symbol that can enter in the gif is the default
 * Color     - Fore color in RGB (FFFFFF) method (Default is black)
 *             if only this parameter is passed it's the background 
 *             color too
 * BgColor   - Background color of the gif.Default is a transparent white.
 * Outline   - The color of the border around the image. These parameter
 *             must be passed to have a border. His width is 1 pixel.
 * Corner    - Remove 1 pixel at each corner of the image. If the browser
 *             don't support transparency the corner color will be the color
 *             passed in parameter (Ex : Corner=FFFFFF will make black corner).