Legend / Chart Key Commands

The following command line arguments to the PDF Chart Creator allow a boxed legend or chart key to be displayed alongside the chart:

Note #1: All color command parameters can be specified in one of three ways, just choose the method that you are most comfortable with:

  • #RRGGBB - HTML color specification, uses hexadecimal notation to define the amount of red (RR), green (GG) and blue (BB) in a color. These values are between 0 (hexadecimal 00) and 255 (hexadecimal FF) inclusive. Click here for more information and examples with hexadecimal colors.
  • R G B - decimal colour specification, uses normal decimal notation to define the amount of red (RRR), green (GGG) and blue (BBB) in a color. These values are between 0 and 255 inclusive. Click here for more information and examples with decimal colors.
  • R.R G.G B.B - real colour specification, used real number notation to define the amount of red (R.R), green (G.G) and blue (B.B) in a color. These values are between 0.0 and 1.0 inclusive. Click here for more information and examples with real colors.
  • Note #2: All font name command parameters must be specified as one of the following standard PDF fonts (also known as base14 fonts):

  • Courier
  • Courier-Bold
  • Courier-BoldOblique
  • Courier-Oblique
  • Helvetica
  • Helvetica-Bold
  • Helvetica-BoldOblique
  • Helvetica-Oblique
  • Times-Roman
  • Times-Bold
  • Times-Italic
  • Times-BoldItalic
  • Symbol
  • ZapfDingbats

  •   -Legend
    Parameters: position - must be one of the following values:
  • Left - shows the legend box to the left of the pie chart.
  • Right - shows the legend box to the right of the pie chart.
  • Above - shows the legend box above the pie chart.
  • Below - shows the legend box below the pie chart.

  • outline color - outline color for the legend box.
    outline width - must be greater than 0.0 and less than or equal to 10.0
    background color - background color for the legend box.
    font point size - must be between 1 and 300 inclusive.
    format - can be up to 20 characters and allows the inclusion of the pie segment label and value to be included by using TTTT to represent the pie segment label and VVVV to represent the value. For example, "TTTT (VVVV)" would show the pie segment label followed by the value in brackets.
    font name - must be one of the standard PDF fonts (see above).
    text color - see text style below for an explanation of it's use.
    text style - must be one of the following:
  • normal - has the text filled in with the required text color
  • stroke - has the text filled in with the required text color and the outline of each letter is "stroked" in the extra color

  • extra color - specified if text style is stroke
    Notes:
  • This command is specific to pie charts.
  • This is optional and controls where the legend box is located and what it looks like.
  • If spaces are required in the format then put quotes around the format text.
  • The legend box will be sized so that it is just large enough to encompass all of the segment labels (as formatted according to the format parameter above) so that the pie chart remains as large as possible on the page.

  •   -DataSeriesLegend
    Parameters: position - must be one of the following values:
  • Left - shows the legend box to the left of the pie chart.
  • Right - shows the legend box to the right of the pie chart.
  • Above - shows the legend box above the pie chart.
  • Below - shows the legend box below the pie chart.

  • outline color - outline color for the legend box.
    outline width - must be greater than 0.0 and less than or equal to 10.0
    background color - background color for the legend box.
    font point size - must be between 1 and 300 inclusive.
    font name - must be one of the standard PDF fonts (see above).
    text color - see text style below for an explanation of it's use.
    text style - must be one of the following:
  • normal - has the text filled in with the required text color
  • stroke - has the text filled in with the required text color and the outline of each letter is "stroked" in the extra color

  • extra color - specified if text style is stroke
    Notes:
  • This command is specific to charts that support multiple data series.
  • This is optional and controls where the legend box is located and what it looks like.
  • The legend box will be sized so that it is just large enough to encompass all of the data series labels (as specified by the DataSeriesLabel command below) so that the chart remains as large as possible on the page.

  •   -DataSeriesLabel
    Parameters: Data series #1 label - is the text associated with the data series - can be up to 100 characters long.
    Data series #2 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #3 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #4 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #5 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #6 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #7 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #8 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #9 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Data series #10 label - is optional and if specified is the text associated with the data series - can be up to 100 characters long.
    Notes:
  • This command is specific to charts that support multiple data series.
  • This is optional but must be specified if the DataSeriesLegend command is used.
  • A label should be specified for each data series.
  • If spaces are required in the label then put quotes around the label text.