BPCharts

   

Table of Contents

  1. Overview
  2. Chart Dimension (chdm)
  3. Chart Data (chd)
  4. Axis Definitions (chxt)
  5. Axis Label Styles (chxs)
  6. Axis Range (chxr)
  7. Colors (chcm)
  8. Color Ranges (chcor, chdlp)
  9. Fills (chf)
  10. Font Name (chft)
  11. Font Size (chfts)
  12. Margins (chmg)

Overview

This is a correlationmatrix cmtx. The size of the matrix can be changed and is 5x5 by default. The chart type code is cmtx.

Example

Description Image
An example

Chart Dimension chdm

The size of the matrix can be specified with the new parameter chdm=<lines>x<rows> Since it is a square matrix, the larger of the to dimensions gets chosen as the number of lines.

Example

Description Image
Create a 7x7 matrix. chdm=7x7
Create a 4x4 matrix chdm=4x4

Chart Data chd

Fills the Cells of the matrix with Numbers.

There are two ways to parse data

Syntax 1

chd=<value_1>[,...,<value_n>]

This way the matrix is filled line by line from left to right

Syntax 2

chd=<line_1>,<value_1>[,...,value_k>][|...|<line_n>,<value_1>[,...,value_k>]]

This way the line specified is filled from left to right with the given values.

Axis Definitions (chxt)

The chxt option allows you to specify where axis labels are drawn.

Syntax

chxt=<axis_1>,...,<axis_n>
<axis>

Display the axis labels, using the following axis codes:

  • x - X-Axis on the bottom of the chart
  • t - X-Axis on the top of the chart
  • y - Y-Axis on the left of the chart
  • r - Y-Axis on the right of the chart

Example

Description Image
Draw all axis labels chxt=x,t,y,r

Axis Label Styles (chxs)

You can control the style of individual axis labels by using the chxs option.

Syntax

chxs=<axis_index>,<circle_color>,<opt_font_size>
     |...|
     <axis_index>,<circle_color>,<font_size>,-1,t,<opt_tick_color>,<opt_font_style>
<axis_index>
The axis to which this applies. The index needs to be followed by 'N*o*'. No other formats are implemented.
<circle_color>
The color, in RRGGBB or RRGGBBAA format, to apply to the axis labels.
<font_size>
The font size to apply to the axis labels.
<opt_tick_color>
Needs to be specified in RRGGBB or RRGGBBAA format, but is not implemented
<opt_font_style>
B for bold, R for regular, I for italic, U for underline, S for strikethrough
Description Image
Draw the right axis blue and make it slightly bigger and bold (FF0000) chxt=t,r
chxs=1N*o*,0000DD,15,-1,t,000000,b

AxisRange (chxr)

You can control the range of an axis by using the chxr option.

Syntax

chxr=<axis_1>,<range_start_1>,<range_end_1>,<opt_major_interval_1>,<opt_minor_interval_1>
     |...|
     <axis_n>,<range_start_n>,<range_end_n>,<opt_major_interval_n>,<opt_minor_interval_n>
<axis>

Specify the axis, using the following axis codes:

  • x - X-Axis on the bottom of the chart
  • t - X-Axis on the top of the chart
  • y - Y-Axis on the left of the chart
  • r - Y-Axis on the right of the chart
<range_start>
The start of the range for the axis. When Chart Version (chvs=) is greater than zero (default is zero) then <range_start> may be optionally ommitted. The range-start will then be calculated automatically.
<range_end>
The end of the range for the axis. When Chart Version (chvs=) is greater than zero (default is zero) then <range_end> may be optionally ommitted. The range-end will then be calculated automatically.
<opt_major_interval>
[Optional] The major interval for the axis. Determines how frequently grid lines are displayed.
<opt_minor_interval>
[Optional] The minor interval for the axis.
Description Image
Draw every 2nd Label in the top axis chxt=t,r
chxr=t,1,5,2

Colors chcm

The chcm option allows you to color the matrix.

Syntax

chcm=<color_1>,<line_1>[,<first_column>[,<last_column>]][|...|<color_n>,<line_n>[,<first_column>[,<last_column>]]

If the parameter first_column ist not given, the entire line gets colored. If last_column is not given or 0, the entire row beginning with first_column gets colored

Examples

Description Image
Render the first line of the matrix orange. chcm=EF6510,1
Render the first two cells in the first line orange and all cells in the second line from the third cell onwards violett chcm=EF6510,1,2|
9F375F,2,3

Color Ranges (chcor, chdlp)

This parameter allows you to control the colors of the matrix by specifying the colors that apply to specific numeric ranges. This parameter is optional and if given superseeds the chcm color specifications. If chdlp is not specified the barometer is not drawn, if it is anything but "b" an error is thrown.

A number that falls outside of any numeric ranges specified by this parameter will be rendered in a gray color.

Syntax

chcor=<opt_lower_1>,<opt_upper_1>,<bg_color_1>,<opt_fg_color_1>
|...|
<opt_lower_n>,<opt_upper_n>,<bg_color_n>,<opt_fg_color_n>
<opt_lower>
[Optional] The lower value, inclusive, of the numeric range. If a value is not specified it means negative infinity.
<opt_upper>
[Optional] The upper value, exclusive, of the numeric range. If a value is not specified it means positive infinity.
<bg_color>
The background color, in RRGGBB or RRGGBBAA format, to apply to the numeric range.
<opt_fg_color>
[Optional] The foreground color, in RRGGBB or RRGGBBAA format, to apply to the numeric range. Defaults to black.

Example

Description Image
Render the matrix in shades of orange to match the matrix. chcor=,10,FFDBC6|
  10,25,F7B284|
  25,50,EF864A|
  50,,EF6510
Render values less than 10 with a dark gray (333333) background and light gray (999999) foreground and render values greater than 10 with a light gray (999999) background and a dark gray (333333) foreground. Show the Barometer. chcor=,10,333333,999999|
  10,,999999,333333&chdlp=b

Fills (chf)

The background color of the chart can be controlled using the chart fill option.

Syntax

chf=<fill_type>,s,<color>
<fill_type>

The part of the chart being filled. Specify one of the following values:

  • bg - Background fill
s
Indicates a solid fill.
<color>
The fill color, in RRGGBB or RRGGBBAA format.

Example

Description Image
Fill the chart background with pale grey (EFEFEF). chf=bg,s,EFEFEF
Fill the chart background with semi-transparent blue (0000FFCC). chf=bg,s,0000FFCC

Font Name (chft)

The font used to render the chart can be specified using the chart font name option.

For raster (e.g. PNG) charts, only fonts which exist on the BPCharts server may be used. For vector (e.g. SVG) charts, the font does not need to exist on the BPCharts server but the client which renders the SVG must have the font installed.

Syntax

chft=<font_name>
<font_name>
The name of the font to use to render the chart.

Example

Description Image
Render a PNG chart using the Times New Roman font. chft=Times New Roman
Render a SVG chart using the Morningstar 1 font. This will only be rendered correctly if the machine viewing this web page has the Morningstar 1 font installed. chft=Morningstar 1
chof=s

Font Size (chfts)

The size font used to render the chart can be specified using the chart font size option. The size of the chart elements, such as the legend, will be adjusted automatically.

For raster (e.g. PNG) charts, the chart font size is measured in pixels. For vector (e.g. SVG) charts, the chart font size is measured in points.

The default font size for raster charts is 11 pixels tall. The default font size for vector charts is 8 points tall.

Syntax

chfts=<font_size>
<font_size>
The size of the font to use to render the chart.

Example

Description Image
Render a PNG chart using an 8-pixel tall font. chfts=8
Render a SVG chart using an 12-point tall font. chfts=12
chof=s

Margins (chmg)

A chart's margins are defined as the area outside of the rendering of the chart data itself. The chart margin may include labels or legends.

By default, BPCharts automatically picks chart margins which fit the labels and legends.

Syntax

chmg=<top>,<right>,<bottom>,<left>
<top>
The top margin for the chart.
<right>
The right margin for the chart.
<bottom>
The bottom margin for the chart.
<left>
The left margin for the chart.

Example

Description Image
Set the space to the borders to 20 chmg=20,20,20,20

Margins (chmg)

A chart's margins are defined as the area outside of the rendering of the chart data itself. The chart margin may include labels or legends.

By default, BPCharts automatically picks chart margins which fit the labels and legends.

Syntax

locale=
<Language Culture Name>
the language culture name.

Example

Description Image
Set locale to de-DE locale=de-DE