Election map (German constituencies)

A flexible map with shading and symbols

Updated 2 years ago by Template retirement home

API information

Explains to developers how to use this template with the Flourish Live API.

template: _156

version: _32


background_colour color

Background colour.

region_border_colour color

Region border colour.

region_border_width number

Region border width.

Min: 0.1

Max: 5

region_border_opacity number

Region border opacity.

Max: 1

highlight_colour color

Colour of highlighted items.

disable_zoom boolean

Disable zoom.


Colour of popup boxes.

Colour of text in popup boxes.

Opacity of popup boxes.

Max: 1

region_prefix string

Number prefix. Optional prefix for numbers; useful for currency symbols

region_suffix string

Number suffix. Optional suffix for numbers; useful for units

region_popups boolean

Show popups on hover.

use_default_names boolean

Use default names in popups.

Custom popup text.


title string


legend_text_colour color

Legend text colour.

legend_text_size number

Legend text size.

legend_width number

Legend width.

legend_bottom boolean

Legend at bottom.

legend_min string

Value at left end of legend. If empty will equal a value near (but not above) the minimum value in the dataset. (continuous scale)

legend_max string

Value at right end of legend. If empty will equal a value near (but not below) the maximum value in the dataset. (continuous scale)


choropleth boolean

Enable land shading.

scale_type string

Type of data.

Allowed values:

  • sequential (Sequential)
  • diverging (Diverging)
  • categorical (Categorical)

no_entry_hide boolean

Hide regions with no entry.

no_data_fill_colour color

Missing data fill colour.

no_data_stripe_colour color

Missing data stripe colour.

region_decimals number

Number of decimal places. Decimal places for numbers. Negative values round to positive powers of 10 (e.g. -2 rounds to nearest 100)

region_magnitude_multiplier number

Shift decimal point. Specify the number of places to move the decimal point (e.g. use -3 to convert 1000 to 1).

Sequential shading

sequential_palette string

Sequential palette. Select a sequential palette See github.com/d3/d3-scale-chromatic for swatches.

Allowed values:

  • r (O)
  • e (R)
  • l (B)
  • r (G)
  • r (G)
  • u (P)
  • u (B)
  • u (B)
  • n (G)
  • r (O)
  • u (P)
  • u (P)
  • u (P)
  • d (R)
  • l (Y)
  • l (Y)
  • l (Y)
  • l (Y)

diverging_palette string

Diverging palette. Select a diverging palette See github.com/d3/d3-scale-chromatic for swatches.

Allowed values:

  • d (R)
  • d (R)
  • i (P)
  • r (B)
  • R (P)
  • u (P)
  • d (R)
  • d (R)
  • p (S)

reverse_scale_colours boolean

Reverse colours.

continuous_scale boolean

Use continuous scale.

underflow_value string

Colour gradient start point. Defaults to value at the left end of the legend. Ignored if Use continuous scale is disabled

colour_gradient_midpoint string

Colour gradient midpoint. Defaults to the value halfway between the start and end points. Ignored if colour scheme is not diverging, if the value is not between start and end points or if Use continuous scale is disabled

overflow_value string

Colour gradient end point. Defaults to value at the right end of the legend. Ignored if value is to the left of Colour gradient start point or if Use continuous scale is disabled.

custom_thresholds string

List of custom thresholds. Ignored if less than two numbers are defined or if Use continuous scale is enabled

equal_swatches boolean

Equal-width swatches. Make all swatches the same length in the legend. Ignored if Use continuous scale is enabled

n_buckets number

Number of buckets. Fit scale with equal-width buckets. Values below scale minimum or above scale maximum will be coloured according to corresponding end bucket. Ignored if a valid list of thresholds is supplied above or if Use continuous scale is enabled.

Min: 3

Max: 9

Categorical shading

categorical_palette string

Categorical palette.

Allowed values:

  • c (A)
  • a (D)
  • a (P)
  • a (P)
  • e (S)
  • e (S)
  • e (S)

use_custom_palette boolean

Define custom categorical palette.

custom_palette text

Add name-colour pairs. Specify a category per line, followed by a colon and then a colour

other_colour color

Color for other values.

Data formatting

decimal_separator string

Decimal separator.

Predefined values:

  • . (.)
  • , (,)

thousand_separator string

Thousand separator.

Predefined values:

  • , (,)
  • . (.)

Embed settings

embed_mode string

Embed mode. If you plan to specify a fixed height when generating your embed code, choose "Fixed height" here and the map will be scaled to be as big as possible in the available space. Otherwise leave the default setting of "Auto height"; in this mode the embedded map will fill the available width and get taller and shorter based on its aspect ratio.

Allowed values:

  • auto (Auto height)
  • fixed (Fixed height)

External data

external_data string

URL (to a .csv).

selected_column string

External column selection.