## Command Line Options

Swiff Chart Generator can be invoked from the command line with specific input parameters. The parameters may be specified in two equivalent ways: either short form (/T for example), or long form (/TITLE).
Some parameters sometimes need arguments with special characters. These characters may encoded in HTTP format (two hexadecimal digits prefixed by '%'). For example %20 specifies a space. The option /S C:\My%20Style.scs is equivalent to /S "C:\My Style.scs"
The general syntax of command line is: (assuming swfchart.exe can be found in the current PATH)
Windows:

      C:\> swfchart.exe [options] [data_filename|-]

Unix:

      $ swfchart [options] [data_filename|-]

Note: For Unix versions, a short option is specified by -o (instead of /O) and a long option is specified by --output (instead of /OUTPUT)
Options are described below:

Short Option | Long Option | Meaning
--- | --- | ---
data_filename |  | Specifies the input data text filename. Data Series can be arranged in rows or in columns. The first column and/or the first row can specify categories names or series titles. When specifying both categories and series titles in the first row and column, the first cell specifies the chart title. IMPORTANT: if no input data file is specified and no /N is given, data file is read from STDIN. Example of data file:
    First Year;Sales;Net Income
    January; 12; 34.3
    February;11; 26.5
    March;   6; 12.6
    April;   7; 25.3
    May;     16; 37.2
    June;    19; 33.1
The previous file specifies two data series: "Sales" and "Net Income". The categories are "January", "February", "March", "April", "May" and "June". The chart title is "First Year". The series are ordered in columns, and data are separated by ";". The decimal separator is ".". The same data can be also specified without any title:
    12;34.3
    11;26.5
    6;12.6
    7;25.3
    16;37.2
    19;33.1
/O output_filename | /OUTPUT output_filename | Specifies the output filename of the generated chart. Do not specify output filename or use "-" to write chart data to stdout. Example: /O C:\a_swf_movie.svg /O "C:\Program Files\Batchs\chart1.jpg" /O C:\Program%20Files\Batchs\chart1.jpg /O D:\charts\my_chart.png
/F format_name | /FORMAT format_name | Specifies the output format. Possible values are: "svg", "jpg", "png", "pdf", "swf". If output format is not specified, it is determined from output filename extension. If it still cannot be found from filename, it defaults to "swf". Example: /F svg /F jpg /F png /F pdf /F swf
/S style | /STYLE style | Specifies the chart style to use. style could be a standard name (located in the installation directory of Swiff Chart Generator, usually C:\Program Files\Swiff Chart Generator\styles), or a direct filename. Example: /S pie/Geneva2 /S pie/Geneva2.scs /S C:/A_style.scs /S "C:\Program Files\Batchs\MyStyle.scs" /S C:\Program%20Files\Batchs\MyStyle.scs
/N string | /DATA string | Directly specify data in argument. The data should be separator-delimited, with "\n" to add a new series. This option should not be used when specifing an input data file. Example: /N "1;2;2.5;5" /N "1;2;3\n1;4;7"
/T string | /TITLE string | Directly specify the chart title in argument. Example: /T "Total Revenue"
| /SUBTITLE string | Directly specify the chart subtitle in argument. Example: /SUBTITLE "Values in USD"
| /HAXIS-TITLE string | Specifies the horizontal axis title. Example: /HAXIS-TITLE "Towns"
| /VAXIS-TITLE string | Specifies the vertical axis title. Example: /VAXIS-TITLE "Size"
| /AXIS-MIN axis value | Specifies the minimum value for an axis. The axis number is 0 for the horizontal axis, 1 for the vertical axis. Example: (for the vertical axis) /AXIS-MIN 1 50.3
| /AXIS-MAX axis value | Specifies the maximum value for an axis. The axis number is 0 for the horizontal axis, 1 for the vertical axis. Example: (for the vertical axis) /AXIS-MAX 1 178.9
| /AXIS-CROSS axis value | Specifies the cross value for an axis. The axis number is 0 for the horizontal axis, 1 for the vertical axis. Example: (for the vertical axis) /AXIS-CROSS 1 100.0
/C string | /CATEGORIES string | Directly specify the categories names in argument. Example: /C "Jan;Fev;Mar;Apr" /C "Orange Colored;Blue Colored"
/I string | /SERIES-TITLES string | Directly specify the series titles in argument. Example: /I "Sales" /I "Sales;Revenues" /I "Power;Cost;The Ratio"
/D delim | /DELIMITERS delim | Specifies the delimiters to be used for parsing the input data file or options. Default delimiter is ";". Example: /D ";" /D ";%09" (Both ";" and TABS will be used as delimiters)
/M bool | /IGNORE-MULTIPLE-DELIMITERS bool | Specifies whether multiple successive delimiters should be considered as a single one or not. Default is False. Example: /M False /M Yes
/TR bool | /TITLES-IN-FIRST-ROW bool | Specifies whether the first row of the input data file contains titles (series titles or categories titles) or not Example: /TR False /TR Yes
/TC bool | /TITLES-IN-FIRST-COL bool | Specifies whether the first column of the input data file contains titles (series titles or categories titles) or not Example: /TC False /TC Yes
/DS char | /DECIMAL-SEP char | Specifies the decimal separator to use for parsing floating point values. Default character depends on your system and international settings. Example: /DS "." /DS ","
/TS char | /THOUSANDS-SEP char | Specifies the thousands separator to use for parsing values. Default character depends on your system and international settings. Example: /TS "," /TS " "
/SR | /SERIES-IN-ROWS | Specifies that the input data series are arranged in rows. Default is in rows. Example: /SR
/SC | /SERIES-IN-COLS | Specifies that the input data series are arranged in columns. Default is in rows. Example: /SC
| /WIDTH pixels | Specifies the width in pixels of the generated chart. Default depends on the chart style. Example: /WIDTH 400
| /HEIGHT pixels | Specifies the height in pixels of the generated chart. Default depends on the chart style. Example: /HEIGHT 300
| /FPS framerate | Specifies the frame rate of the generated Flash chart movie. (if animated) Default depends on the chart style. Example: /FPS 2 /FPS 12 /FPS 24
/A bool | /ANIMATE bool | Specifies whether the generated chart should be animated or not. bool is a boolean value. Example: /A False (or /A no or /A 0) /A True (or /A yes no /A 1)
| /LOOPING bool | Specifies whether the generated Flash movie should be looping or not. (if animated) Default is True. Example: /LOOPING False
| /COMPRESS bool | Specifies whether the generated file should be compressed or not. Example: /COMPRESS True
| /JPG-QUALITY quality | Specifies the JPG encoding quality, from 100 (high quality, large size) to 0 (bad quality, small size). Default JPG encoding quality is 85. Example: /JPG-QUALITY 90
| /PNG-COMP-LEVEL comp_level | Specifies the PNG compression level, from 9 (small size, slow compression) to 1 (large size, fast compression). Use 0 (zero) to disable compression. Default PNG compression level is 3. Example: /PNG-COMP-LEVEL 9
/? | /HELP | Display a full text help on the console.
| /VERSION | Display Version Information on the console.

Cache related options:

Short Option | Long Option | Meaning
--- | --- | ---
| /DOC-ROOT path | Specify web server document root Example: /DOC-ROOT C:\www\root
| /CACHE-NAME name | Specify web server cache directory name (default: charts_cache) Example: /CACHE-NAME my_cache
| /HTML-TAG | Generate the chart in the cache (required a document root) and output the HTML tag using the cached output filename Example: /HTML-TAG
| /OUTPUT-LOC | Generate the chart in the cache (required a document root) and output cached output location relative to the document root Example: /OUTPUT-LOC
| /PRIVATE-CACHE-DIR path | Specify private cache directory name (defaults to public cache) Example: /PRIVATE-CACHE-DIR E:\swfchart\private
| /MAX-CACHE-SIZE kilobytes | Specify the maximum size of the cache in KB (default: 4096 KB) Example: /MAX-CACHE-SIZE 16000
| /CLEAR-CACHE | Clear the cache and exit without generating a chart Example: /CLEAR-CACHE
| /USE-CACHE | Cache the generated chart (always actvated with html-tag). Example: /USE-CACHE

Unix options:

Short Option | Long Option | Meaning
--- | --- | ---
| --fonts directories | Specify the TrueType font directories by a colon-separated list Example: --fonts /usr/share/fonts:/usr/ttf
| --install-dir directory | Specify the installation directory (default: /usr/local/SwiffChart) Example: --install-dir /usr/swfchart