BPCharts

   

Table of Contents

  1. Overview
  2. Getting Started
  3. Color Ranges (chcor)
  4. Fills (chf)
  5. Recenter (chrc)
  6. Legend and Region Labels (chxt, chdls, chxs)
  7. Axis Label Gap (chxlg)


Overview

The regional breakdown chart is a standard Morningstar chart. It is used to show the concentration of an investment in a particular region of the world..

The chart type code for the regional breakdown chart is rb.



Getting Started

Description Image

To use the regional breakdown chart, you must provide a series of percentage weights for each region. The regions are (approximately):

  1. North America
  2. Central and South America
  3. UK
  4. Western Europe
  5. Eastern Europe
  6. Africa and Middle East
  7. Japan
  8. Australasia
  9. Asia Developed
  10. Asia Emerging
  11. Russia

Missing values are drawn in light gray.

chd=t:30,10,10,10,10,10,
10,10,0,0,
As with all charts, you can specify data using different data encodings. See data encodings for more information.
chd=s:eKKKKKKKAA_
As with all charts, the chart size is controllable using the chs parameter.
chs=100x50
As with all charts, you can generate other image types using the chof parameter.
chof=s (SVG)


Color Ranges (chcor)

This parameter allows you to control the colors of the regional breakdown barometer by specifying the colors that apply to specific numeric ranges.

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 regional breakdown chart in shades of gray.
chcor=,10,CCCCCC|
10,25,999999|
25,50,666666|
50,,333333


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 yellow (FBF8DDCC).
chf=bg,s,FBF8DDCC


Recenter (chrc)

The regional breakdown chart can be recentered to provide a different "view of the world" based on customers' demands.

Syntax

chrc=<region>
<region>

The new center of the image. Specify one of the following values:

  • america - America (default)
  • europe - Europe
  • asia - Asia

Example

Description Image
Recenter the chart to put Europe in the center.
chrc=europe
Recenter the chart to put Asia in the center.
chrc=asia


Legend and Region Labels (chxt, chdls, chxs)

The regional breakdown chart supports adding a legend and region labels.

Syntax

chxt=<axis>
	
chdls=<font_color>,<font_size> -- Optional
chxs=<axis_index>,<label_color>,<font_size>,<alignment>,<tick>,<tick_color>,<opt_font_style> |...| <axis_index>,<label_color>,<font_size>,<alignment>,<tick>,<tick_color>,<opt_font_style>
<axis>

supported axis

  • x - legend
  • t - region labels
<font_color>

The fill color, in RRGGBB or RRGGBBAA format. Black by default if chdls= not supplied.

<font_size> (optional)

Font size in points. By default, this is the fontsize of the chart from (chfts).

<axis_index>
The axis to which this applies.
<label_color>
Needs to be specified in RRGGBB or RRGGBBAA format.
<font_size>
Needs to be specified.
<alignment>
Needs to be -1. No other values can be parsed.
<tick>
Needs to be specified. Not implemented.
<tick_color>
Needs to be specified. Not implemented.
<opt_font_style>
Sets the Fontstyle. R for regular, B for bold, S for Strikeout, U for Underline, I for Italic. Not case sensitive.

Example

Description Image
Include a legend with the chart.
chxt=x
Include region labels (based on web browser’s locale)
chxt=x,t
Change the font size
chfts=8
Change the font type (to Arial)
chft=Arial&chfts=8
Change the legend font color (to Red)
chdls=FF0000
Change the label font color (to Red) size (10pt) and style (Underlined)
chxs=1,FF0000,10,-1,0,FFFFFF,U
Include region labels (override auto-detected locale in URL and use a Unicode font for Chinese characters)
chft=JhengHei, locale=zh-CN
Override legend values
chxl=1:|<2xcc|25-50cc|50-74cc|>75


Axis Label Gap (chxlg)

The chxlg option allows you to manually specify the gap between the labels for an axis and the axis itself.

Syntax

chxlg=<axis_1>,<gap_1>
      |...|
      <axis_n>,<gap_n>
     
<axis>

Display the axis, using the following axis codes:

  • t - X-Axis on the top of the chart
  • x - X-Axis on the bottom of the chart
<gap>
The gap, in pixels for raster formats and points for vector formats, between the axis labels and the axis.

Example

Description Image
Create a 20-pixel gap between the labels of the x-axis on the top of the chart and the chart itself.
chxlg=t,20
Create a 20-pixel gap between the labels of the x-axis on the bottom of the chart and the chart itself.
chxlg=x,20


TODO

  • Locale (locale)