Sports race

Create animated sports races over preset or custom tracks

Updated a year ago to v2.1.2 by Flourish team

How to use this template

What's it for?

Use this template to visualize competitions where participants race along a fixed track or course, for example a 100m sprint, or a slalom ski race.

How to get started

Add one row of data for each participant in the race – like a sprinter or a skier. Use the first column to populate with the participants’ names. The other columns are times taken at set points in the race. It could just be a single finishing time, for example:

name Finishing time
Usain Bolt 9.58
Tyson Gay 9.69

It could refer to laps of a course:

name Lap 1 Lap 2 Lap 3 Lap 4
Paul Biedermann 0:24.23 0:50.12 1:16.30 1:42.00
Michael Phelps 0:24.31 0:50.29 1:16.84 1:42.96

Or to times taken at particular checkpoints along the route:

name Checkpoint 1 Checkpoint 2 Finish
Tadej Pogačar 10:38.950 20:04.050 32:00.830
Stefan Küng 10:49.330 20:21.090 32:19.100

Credits

Created by the Flourish team. Want to see additional features? Let us know at support@flourish.studio.

This section documents API usage specific to this template, so for an introduction we suggest you refer to the generic API documentation instead.

template: @flourish/template-sports-race

version: 2

Template data

There are three different formats in which you can supply data to this template. The most convenient for you to use likely depends on the source of your data, as described below.

1. Array of arrays, and a bindings object

You can supply arrays of arrays to opts.data, which might look like:

{
    data: {
        data: [
            [ "DataColumn1Value1", "DataColumn2Value1",
            [ "DataColumn1Value2", "DataColumn2Value2",
            [ "DataColumn1Value3", "DataColumn2Value3",
            ...
        ]
    }
}

where each array of arrays represents the rows in a data sheet.

To tell the API how the values from each column should be associated with the keys that the template is expecting, you must also supply an object attached to opts.bindings. (The meanings of the keys in the bindings object are documented below.) The minimal bindings you can supply for this template are as shown in this example:

{
    template: "@flourish/template-sports-race",
    version: "2",
    bindings: {
        data: {
            name: 0, // index of a column in your data
        }
    },
    data: {
        data: [
            [ "DataColumn1Value1", "DataColumn2Value1",
            [ "DataColumn1Value2", "DataColumn2Value2",
            [ "DataColumn1Value3", "DataColumn2Value3",
            ...
        ]
    }
}

All possible bindings that you can supply are shown in this example:

{
    template: "@flourish/template-sports-race",
    version: "2",
    bindings: {
        data: {
            name: 0, // index of a column in your data
            times: [1, 2, ...], // index(es) of column(s) in your data
            start_image: 3, // index of a column in your data
            race_image: 4, // index of a column in your data
            finish_image: 5, // index of a column in your data
            color_category: 6, // index of a column in your data
        }
    },
    data: {
        data: [
            [ "DataColumn1Value1", "DataColumn2Value1",
            [ "DataColumn1Value2", "DataColumn2Value2",
            [ "DataColumn1Value3", "DataColumn2Value3",
            ...
        ]
    }
}

2. Array of objects with arbitrary keys, and a bindings object

This format is most likely useful when you have data from an external source, such as CSV data loaded from d3-dsv. You should supply this attached to the opts.data, which might look like:

{
        data: [
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            ...
        ]
    }

... but with the keys being the column headers from your source data instead. You must also supply an object attached to opts.bindings. The minimal bindings you can supply for this template are as shown in this example:

{
    template: "@flourish/template-sports-race",
    version: "2",
    bindings: {
        data: {
            name: "DataHeader1",
        }
    },
    data: {
        data: [
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            ...
        ]
    }
}

All possible bindings that you can supply are shown in this example:

{
    template: "@flourish/template-sports-race",
    version: "2",
    bindings: {
        data: {
            name: "DataHeader1",
            times: ["DataHeader2", "DataHeader3", ...],
            start_image: "DataHeader4",
            race_image: "DataHeader5",
            finish_image: "DataHeader6",
            color_category: "DataHeader7",
        }
    },
    data: {
        data: [
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            { "DataHeader1": ..., "DataHeader2": ..., ... },
            ...
        ]
    }
}

(As before, the keys containing "Header" would be replaced by column names from your data source.)

3. Array of objects with template-defined keys

There is an alternative format you can use, which is likely to be easier to use if your data is not from a spreadsheet source. With this alternative format you supply your data to the template as an array of objects, attached to opts.data, where the keys must be those used by the template, as documented below. In this case there is no need to supply a bindings object, since the key names are already those expected by the template. The required properties in the data object are as follows (scroll down for a description of what each property is):

{
    template: "@flourish/template-sports-race",
    version: "2",
    data: {
    data: [
        {
            name: ...,
            times: [...]
        },
        ...
    ]
},
    ...
}

And the full list of all possible properties is as follows:

{
    template: "@flourish/template-sports-race",
    version: "2",
    data: {
    data: [
        {
            name: ...,
            times: [...],
            start_image: ...,
            race_image: ...,
            finish_image: ...,
            color_category: ...
        },
        ...
    ]
},
    ...
}

Meanings of the template data keys:

  • data.name: Name of competitor
  • data.times: One or more columns of numbers, representing splits or laps, or a whole race
  • data.start_image: The URL of the image to use at the start of the race
  • data.race_image: The URL of the image to use while a participant is racing
  • data.finish_image: The URL of the image to use when the participant has finished the race
  • data.color_category: Add a category to color participants by. If empty, the "name" column will be used for colors.

Template settings

Options for opts.state.

Track & participants

preset_svg string

Allowed values:

  • athletics (Athletics)
  • swimming (Swimming)
  • cycling (Cycling)
  • custom (Custom)

custom_svg text

Custom SVG.

track_path_id string

Path ID. The ID of the element in the SVG which defines the centre of the track

track_lane_width number

Lane width. The distance between each participants

track_back_and_forth boolean

Track type. Whether the track goes back and forth, like a swimming pool, or back to the start, like a race track

Allowed values:

  • false (fa-undo)
  • true (fa-exchange)

participant_icon_mode string

Icon type.

Allowed values:

  • circle (Circle)
  • image (Images)

participant_size number

Size.

participant_stroke_width number

Line width.

participant_stroke_opacity number

Stroke opacity.

Max: 1

participant_fill_opacity number

Fill opacity.

Max: 1

preset_participant_image string

Default images. The images used if no image is included for the participant via the data sheet

Allowed values:

  • runner (Runner)
  • swimmer (Swimmer)
  • cyclist (Cyclist)
  • custom (Custom)

custom_participant_start_image url

Custom start image. The image shown at the start of the race

custom_participant_race_image url

Custom racing image. The image shown while the participant is racing

custom_participant_finish_image url

Custom finish image. The image shown when the participant has finished the race

image_initial_rotation string

Rotate images.

Allowed values:

  • 0 (0°)
  • 90 (90°)
  • 180 (180°)
  • 270 (270°)

image_initial_flip_x boolean

Flip horizontally.

image_initial_flip_y boolean

Flip vertically.

image_transform_mode string

Direction change. Change the direction of the image based on which way the participant is travelling.

  • "Rotate" rotates the image to face the direction of travel.
  • "Flip horizontally" flips the image horizontally depending on whether the participant is travelling towards the left or right.
  • "Flip vertically" flips the image vertically depending on whether the participant is travelling towards the top or bottom.
  • "Flip horizontally and vertically" combines the horizontal and vertical flip settings.
  • "Static" doesn't change the direction of the image.

Allowed values:

  • rotate (Rotate)
  • flip_x (Flip horizontally)
  • flip_y (Flip vertically)
  • flip_both (Flip horizontally and vertically)
  • static (Static)

participant_icon_recolor boolean

Recolor icons. Apply colors to differentiate the participants. Works best with greyscale images. In Internet Explorer, the images will be displayed without recoloring.

participant_color.categorical_palette colors

Palette.

participant_color.categorical_extend boolean

Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once.

participant_color.categorical_custom_palette text

Custom overrides. Type the name of the entity whose colour you want to set, a colon and then a colour (using a name, hex-code or rgb declaration). Multiple colours can be set using multiple lines. For example:


Party 1: red
Party 2: #4455AA
Party 3: rgb(30,168,26)

participant_color.numeric_type string

Scale type.

Allowed values:

  • sequential (Sequential)
  • diverging (Diverging)

participant_color.binning boolean

In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks.

Allowed values:

  • false (Linear)
  • true (Binned)

participant_color.bin_mode string

Binning mode.

Allowed values:

  • fixed (Fixed width)
  • quantile (Quantile)
  • custom (Custom thresholds)

participant_color.bin_count number

Number of bins.

participant_color.bin_thresholds string

Custom thresholds. Write your custom thresholds, separated by a ";" For example "5;10;15". Bins are created between the domain minimum and the first threshold, between each threshold and between the final threshold and the domain maximum. Therefore for the example "5;10;15" four bins are created. (The domain is the minimum and maximum values of your data.)

participant_color.sequential_palette string

Palette.

Allowed values:

  • Oranges (Oranges)
  • Reds (Reds)
  • Blues (Blues)
  • Greens (Greens)
  • Greys (Greys)
  • Purples (Purples)
  • Viridis (Viridis)
  • Inferno (Inferno)
  • Magma (Magma)
  • Plasma (Plasma)
  • Warm (Warm)
  • Cool (Cool)
  • CubehelixDefault (Cubehelix)
  • BuGn (Blue/Green)
  • BuPu (Blue/Purple)
  • GnBu (Green/Blue)
  • OrRd (Orange/Red)
  • PuBuGn (Purple/Blue/Green)
  • PuBu (Purple/Blue)
  • PuRd (Purple/Red)
  • RdPu (Red/Purple)
  • YlGnBu (Yellow/Blue/Green)
  • YlGn (Yellow/Green)
  • YlOrBr (Yellow/Orange/Brown)
  • YlOrRd (Yellow/Orange/Red)
  • Carrots
  • Custom

participant_color.sequential_reverse boolean

Reverse.

participant_color.sequential_custom_min color

Minimum color.

participant_color.sequential_custom_max color

Maximum color.

participant_color.sequential_color_space string

Color space.

Allowed values:

  • rgb (RGB)
  • lab (LAB)
  • hcl (HCL)
  • hsl (HSL)

participant_color.sequential_custom_domain boolean

Domain.

Allowed values:

  • false (Auto)
  • true (Custom)

participant_color.sequential_domain_min number

Min.

participant_color.sequential_domain_max number

Max.

participant_color.diverging_palette string

Palette.

Allowed values:

  • RdBu (Red/Blue)
  • RdYlGn (Red/Yellow/Green)
  • PiYG (Pink/Yellow/Green)
  • BrBG (Brown/Blue/Green)
  • PRGn (Purple/Red/Green)
  • PuOr (Purple/Orange)
  • RdGy (Red/Grey)
  • RdYlBu (Red/Yellow/Blue)
  • Spectral (Spectral)
  • Custom

participant_color.diverging_reverse boolean

Reverse.

participant_color.diverging_custom_min color

Minimum color.

participant_color.diverging_custom_mid color

Midpoint color.

participant_color.diverging_custom_max color

Maximum color.

participant_color.diverging_color_space string

Color space.

Allowed values:

  • rgb (RGB)
  • lab (LAB)
  • hcl (HCL)
  • hsl (HSL)

participant_color.diverging_custom_domain boolean

Domain.

Allowed values:

  • false (Auto)
  • true (Custom)

participant_color.diverging_domain_min number

Min.

participant_color.diverging_domain_mid number

Mid.

participant_color.diverging_domain_max number

Max.

Camera

camera_mode string

Camera mode.

Allowed values:

  • track (Entire track)
  • leader (Follow leader)

zoom number

Zoom level. How much to zoom in when playing

Min: 1

Laps & splits

checkpoint_mode string

Checkpoint mode.

Allowed values:

  • laps (Laps)
  • splits (Equal splits)
  • custom (Custom)

checkpoints text

Checkpoints. Enter the number of laps completed at each recorded checkpoint/column in the data. E.g. "0.5, 1, 1.5, 2" would mean that the times were taken every half a lap. Enter one checkpoint per line.

times_cumulative boolean

Times are cumulative. Switch on if the time columns represent the cumulative time taken at each checkpoint (e.g. 12, 25, 36). Switch off if the times represent how long individual checkpoints took to complete (e.g. 12, 13, 11).

Labels

participant_label_mode string

Label mode. Determines which labels are drawn. Auto draws as many labels as possible whilst avoiding overlaps.

Allowed values:

  • auto (Auto)
  • leader (Leader)
  • all (All)
  • custom (Custom)

participant_label_custom text

Participants to label. Enter the names of the participants to label. These must exactly match the names in your data. Enter one name per line.

participant_label_position string

Label position.

Allowed values:

  • auto (Auto)
  • left (Left)
  • right (Right)

participant_label_style boolean

Style.

participant_label_color color

Color.

participant_label_size number

Size.

Min: 0.05

participant_label_stroke color

Outline.

participant_label_stroke_size number

Outline width. As a % of the font size

participant_label_weight string

Weight.

Allowed values:

  • 400 (Normal)
  • 600 (Bold)

participant_highlight boolean

Highlight icons. Highlight the labelled participant(s)

participant_highlight_color color

Highlight color.

participant_highlight_width number

Highlight width.

label_position_enabled boolean

Whether to show the position of the participant in the label

Allowed values:

  • false (Disabled)
  • true (Enabled)

label_position_time string

Show position. Set to “At finish”, to only show a participant's position when they've completed the race. Set to “During race” to only show a participant's position while they are still racing.

Allowed values:

  • always (Always)
  • race (During race)
  • finish (At finish)

label_position_type string

Position to show. Whether to show a participant's current position in the race, or their finishing position

Allowed values:

  • current (Current)
  • finish (Finishing)

label_medal_enabled boolean

Allowed values:

  • false (Disabled)
  • true (Enabled)

label_medal_time string

Show medals. Set to “At finish”, to only show a participant's medal when they've completed the race. Set to “During race” to only show a participant's medal while they are still racing.

Allowed values:

  • always (Always)
  • race (During race)
  • finish (At finish)

label_medal_type string

Medal to show. Whether to show the medal position for a participant at the current point in the race, or the medal they win at the end of the race

Allowed values:

  • current (Current)
  • finish (Finishing)

label_medal_replace_position boolean

Replace position. Turn on to replace a participant's position label with their medal if they are in a medal position

label_finishing_time_enabled boolean

Allowed values:

  • false (Disabled)
  • true (Enabled)

label_finishing_time_time string

Show finishing time.

Allowed values:

  • always (Always)
  • finish (At finish)

participant_stacking string

Determines which participants obscure other participants when they overlap

Allowed values:

  • sheet_order (Data order)
  • rank (Leader first)
  • y_position (Y position)

Timeline & animation

timeline.enabled boolean

Allowed values:

  • true (Enabled)
  • false (Disabled)

timeline.style string

Style.

Allowed values:

  • timeline (Timeline)
  • button (Play/pause)

timeline.graph boolean

Show chart.

Allowed values:

  • true (Show)
  • false (Hide)

timeline.play_on_load boolean

Play on load.

timeline.loop boolean

Loop timeline. When turned on, the timeline will return to the beginning once complete. Otherwise, it will stop when it reaches the end.

timeline.duration number

Timeline duration. Total duration of the timeline during normal playback (in seconds).

timeline.duration_tween number

Time jump duration. Duration of transitions between different points in time on the timeline. This is the transition you see in the story player when switching between slides with a different time one the timeline (in seconds).

timeline.duration_wait_at_end number

Pause before loop.

timeline.axes_custom_enabled boolean

Axis settings.

timeline.color_axes color

Axes color.

timeline.axis_font_size number

Font size.

Max: 3

timeline.date_format_display string

X axis date format.

Predefined values:

  • (Auto)
  • %Y-%m-%dT%H:%M:%S.%LZ (1986-01-28T11:39:13.000Z)
  • %Y-%m-%d (1986-01-28)
  • %m/%d/%Y (01/28/1986)
  • %d/%m/%Y (28/01/1986)
  • %d-%b-%y (28-Jan-86)
  • %m/%Y (01/1986)
  • %b %Y (Jan 1986)
  • %b '%y (Jan '86)
  • %B %d (January 28)
  • %d %b (28 Jan)
  • %Y (1986)
  • %B (January)
  • %b (Jan)
  • %A (Tuesday)
  • %a (Tue)
  • %H:%M:%S (11:39:13)
  • %I:%M %p (11:39 AM)
  • %H:%M (11:39)

timeline.axis_nice_x boolean

Clean X axis. Rounds out the X axis so that its start and end values are nice, round numbers

timeline.axis_nice_y boolean

Clean Y axis. Rounds out the Y axis so that its start and end values are nice, round dates

timeline.scrubber_snap boolean

Snap when scrubbing. When turned on, you can only jump to values that are supplied in the dataset and nothing in between

timeline.scrubber_snap_paused boolean

Snap when paused. Enabling this will cause the timeline to snap to the nearest interval when not animating. This is useful for ensuring the data visible in the visualisation always reflects the data you have supplied.

timeline.layout_settings boolean

Layout settings.

timeline.margin.top number

Top.

timeline.margin.left number

Left.

timeline.margin.bottom number

Bottom.

timeline.margin.right number

Right.

timeline.playback_button.margin_right number

Space between button and timeline.

timeline.scrubber_height number

Scrubber height.

timeline.playback_button.margin_right_button number

Space between button and text.

timeline.graph_settings boolean

Chart settings.

timeline.color_background color

Background.

timeline.graph_height number

Height.

timeline.curve boolean

Curved lines.

timeline.playback_styling boolean

Play button settings.

timeline.playback_button.button_color color

Button color.

timeline.playback_button.button_size number

Button size.

Max: 8

timeline.playback_button.icon_color color

Icon color.

timeline.playback_button.icon_size number

Icon size.

Max: 8

timeline.playback_button.label_size number

Label size.

Max: 8

Layout

layout.body_font font

Main font. This font will apply to the whole graphic by default, but you can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels.

layout.font_color color

Text color. This color will apply to the whole graphic by default, but you can optionally change the color for individual text elements, in other settings panels.

layout.background_color_enabled boolean

Color.

Allowed values:

  • true (On)
  • false (Off)

layout.background_image_enabled boolean

Image.

Allowed values:

  • true (On)
  • false (Off)

layout.background_color color

Background color.

layout.background_image_src url

Image URL.

layout.background_image_size string

Size.

Allowed values:

  • cover (Fill)
  • contain (Fit)
  • auto (Original)
  • 100% 100% (Stretch)

layout.background_image_position string

Position.

Allowed values:

  • top left (Top left)
  • top center (Top center)
  • top right (Top right)
  • center left (Center left)
  • center center (Center)
  • center right (Center right)
  • bottom left (Bottom left)
  • bottom center (Bottom center)
  • bottom right (Bottom right)

layout.max_width_target string

Maximum width. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc)

Allowed values:

  • none (None)
  • wrapper (Everything)
  • primary (Main graphic)

layout.max_width number

Maximum width. Leave blank to stretch to container width

Min: 50

layout.max_width_align string

Align.

Allowed values:

  • left (fa-align-left)
  • center (fa-align-center)
  • right (fa-align-right)

layout.layout_order string

Layout order.

Allowed values:

  • stack-default (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAdCAYAAAHZdKxuAAAAAXNSR0IArs4c6QAAANhJREFUSA3tVNEOwiAM7Iy/p2/wkTz6g5gjOVZZEepcjMmWLBTau95ugIh6lpzzLcb4wNpFJaRk9MIahxAyXmD7mC7BC2RlFbliQjFMpJTujOdGs/ECwRoP3rlKoEzNJlz3+CwutK0NLRVt2QhjggA9n2IGEKANMxmt0VVsEfxgzfX7zL3ZiqbXLjcKc8vEORk5/75mMB/7u11uuIpdbtDCc5R3l/s+e+pmHt1foza7Nv6IXOeHiqGk9zWtSk1cN2cPrItnYjZzHZEZYtacxHTiuANSO/xN8AS4uW8Rw1Gu2AAAAABJRU5ErkJggg==)
  • stack-2 (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAdCAYAAAHZdKxuAAAAAXNSR0IArs4c6QAAAMpJREFUSA3tVMsKwyAQNKW/l970Iz32Bw0jjKTrSLUY0oOBsO5rnOwYnTs9W0ppDyG8EcsOkw8uauu9T3jR2+75yJxBnnC4JxMxxlezg0V9VsJsIGz75TfKdlkpg3aPcT8TsPNRMJjZEIf5xaAAahUyE+RtfcZvtFLoFh95aFXxH4hCWpUoTCg7fxqUfB4yEcl/CJlNy5qbfuZA8m8CwJ77q2djSj50lnuAWbOAOQlXxCuRHxcUje2XzfgrYzBpHUXLkmxh181SpnEAB4Vg0DSGhHsAAAAASUVORK5CYII=)
  • stack-3 (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAdCAYAAAHZdKxuAAAAAXNSR0IArs4c6QAAANFJREFUSA3tVEEOwyAMo9O+193gkRz3QSZHMmNRUkGp1guVqkCIHZMAITTfVkrZU0pv+B7NQpCV1vEdxxgLfmB9jEvwBBNzkjXn/HIRDOqzJs0GwS1eEmonAn52RITJaUYScd5KLl0fTQf58HVpIFlXMDPNBVMf2TDXPq7dZM2eelrMQ6uDucG50mlWzG/ooCWDvqENXldn1pcyhpgJWjYcPe5z5ZFrAgoe2LN0f2v1ZYq5UyofuiME99hFXKtUm1c9aoBmeEeRjVIQma6XpVblAwnpZjN/VjqsAAAAAElFTkSuQmCC)
  • stack-4 (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAdCAYAAAHZdKxuAAAAAXNSR0IArs4c6QAAANtJREFUSA3tVNEOwjAI3Iy/p2/tR/bRH6zekmuA1glO45bYZAHKcdDCOk1izbXWC+0zlJzzDVJ5sNGW9qSUKj4QKY8yWvBDUWnoKKVcTzS2yWHiIfeMwm2yIbLbRL3DRJYubi+0bAPCkcvapO3AdFgZvuDuyJZR2i4wSpBBP9ZD7RsOLQ9gD/Y5ZmaA3EEHWY6r3SEwrzDEHLpnlvOXa4/7xttZfhNwyPdKcqLPaz6JlXpr9bNgCfbobw2ch5iY0CQzyCOPR9ya5zleBPNy3LxknAbiv1YxExxH3gEqBW7I4zw3PQAAAABJRU5ErkJggg==)

layout.space_between_sections string

Space between sections.

Allowed values:

  • 0.5 (▁)
  • 1 (▃)
  • 1.5 (▄)
  • custom (...)

layout.space_between_sections_custom number

Custom.

Max: 100

layout.margin_top number

Top.

layout.margin_right number

Right.

layout.margin_bottom number

Bottom.

layout.margin_left number

Left.

layout.border.enabled boolean

Show borders around visualisation.

layout.border.top.width number

Top.

layout.border.top.style string

Style.

Allowed values:

  • solid (Solid)
  • dashed (Dashed)
  • dotted (Dotted)

layout.border.top.color color

Color.

layout.border.right.width number

Right.

layout.border.right.style string

Style.

Allowed values:

  • solid (Solid)
  • dashed (Dashed)
  • dotted (Dotted)

layout.border.right.color color

Color.

layout.border.bottom.width number

Bottom.

layout.border.bottom.style string

Style.

Allowed values:

  • solid (Solid)
  • dashed (Dashed)
  • dotted (Dotted)

layout.border.bottom.color color

Color.

layout.border.left.width number

Left.

layout.border.left.style string

Style.

Allowed values:

  • solid (Solid)
  • dashed (Dashed)
  • dotted (Dotted)

layout.border.left.color color

Color.

layout.read_direction string

Read direction. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements such as axes. Note that when direction is set to "right to left" any alignment icons will be reversed.

Allowed values:

  • ltr (Left to right)
  • rtl (Right to left)

layout.header_align string

Alignment.

Allowed values:

  • left (fa-align-left)
  • center (fa-align-center)
  • right (fa-align-right)

layout.title html

layout.title_styling boolean

Styling.

layout.title_font font

Title Font.

layout.title_size string

Size.

Allowed values:

  • 1.4 (ᴀ)
  • 1.6 (A)
  • 2 (fa-font)
  • custom (...)

layout.title_size_custom number

Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3

layout.title_weight string

Weight.

Allowed values:

  • bold (Bold)
  • normal (Regular)

layout.title_color color

Color.

layout.title_line_height number

Line height.

Max: 3

layout.title_space_above string

Space above.

Allowed values:

  • 0 (▁)
  • 0.5 (▃)
  • 1 (▄)
  • custom (...)

layout.title_space_above_custom number

Custom.

Max: 100

layout.subtitle html

layout.subtitle_styling boolean

Styling.

layout.subtitle_font font

Subtitle Font.

layout.subtitle_size string

Size.

Allowed values:

  • 1.4 (ᴀ)
  • 1.6 (A)
  • 2 (fa-font)
  • custom (...)

layout.subtitle_size_custom number

Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3

layout.subtitle_weight string

Weight.

Allowed values:

  • bold (Bold)
  • normal (Regular)

layout.subtitle_color color

Color.

layout.subtitle_line_height number

Line height.

Max: 3

layout.subtitle_space_above string

Space above.

Allowed values:

  • 0 (▁)
  • 0.5 (▃)
  • 1 (▄)
  • custom (...)

layout.subtitle_space_above_custom number

Custom.

Max: 100

layout.header_text html

layout.header_text_styling boolean

Styling.

layout.header_text_size string

Size.

Allowed values:

  • 1.2 (ᴀ)
  • 1.4 (A)
  • 1.6 (fa-font)
  • custom (...)

layout.header_text_size_custom number

Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3

layout.header_text_weight string

Weight.

Allowed values:

  • bold (Bold)
  • normal (Regular)

layout.header_text_color color

Color.

layout.header_text_line_height number

Line height.

Max: 3

layout.header_text_space_above string

Space above.

Allowed values:

  • 0 (▁)
  • 0.5 (▃)
  • 1 (▄)
  • custom (...)

layout.header_text_space_above_custom number

Custom.

Max: 100

layout.header_border string

Allowed values:

  • top (Top)
  • bottom (Bottom)
  • top_and_bottom (Top & bottom)
  • none (None)

layout.header_border_width number

Width.

layout.header_border_color color

Color.

layout.header_border_style string

Style.

Allowed values:

  • solid (Solid)
  • dashed (Dashed)
  • dotted (Dotted)

layout.header_border_space number

Space. Space between border and header text

layout.header_logo_enabled boolean

Allowed values:

  • true (Enabled)
  • false (Disabled)

layout.header_logo_src url

Image.

layout.header_logo_alt string

Alt text.

Link.

layout.header_logo_height number

Height.

layout.header_logo_align string

Align. Align logo inside either the header or the main visualisation container

Allowed values:

  • inside (Header)
  • outside (Main container)

layout.header_logo_position_inside string

Position.

Allowed values:

  • top (Top)
  • left (Left)
  • right (Right)

layout.header_logo_position_outside string

Position.

Allowed values:

  • left (Left)
  • right (Right)

layout.header_logo_margin_top number

Top.

layout.header_logo_margin_right number

Right.

layout.header_logo_margin_bottom number

Bottom.

layout.header_logo_margin_left number

Left.

layout.footer_align string

Alignment.

Allowed values:

  • left (fa-align-left)
  • center (fa-align-center)
  • right (fa-align-right)
  • justify (fa-align-justify)

layout.footer_text_size number

Size.

layout.footer_text_color color

Color.

layout.footer_styling boolean

Advanced footer styles.

layout.footer_font font

Font.

layout.footer_text_weight string

Weight.

Allowed values:

  • bold (Bold)
  • normal (Regular)

layout.source_name string

Source name.

layout.source_url string

Source url.

layout.multiple_sources boolean

Multiple sources.

layout.source_name_2 string

Source name.

layout.source_url_2 string

Source url.

layout.source_name_3 string

Source name.

layout.source_url_3 string

Source url.

layout.source_label string

Source label.

layout.footer_note string

Note.

layout.footer_note_secondary string

Note (secondary). The secondary note is placed below the source and primary note

layout.footer_logo_enabled boolean

Image.

Allowed values:

  • true (Enabled)
  • false (Disabled)

layout.footer_logo_src url

Image.

layout.footer_logo_src_light hidden

Image (light version). If provided this version will be used whenever the background colour is dark

layout.footer_logo_alt string

Alt text.

Link.

layout.footer_logo_height number

Height.

layout.footer_logo_margin number

Margin.

layout.footer_logo_order string

Position.

Allowed values:

  • left (Left)
  • right (Right)

layout.footer_align_vertical string

V. align.

Allowed values:

  • flex-start (Top)
  • center (Center)
  • flex-end (Bottom)

layout.footer_border string

Allowed values:

  • top (Top)
  • bottom (Bottom)
  • top_and_bottom (Top & bottom)
  • none (None)

layout.footer_border_width number

Width.

layout.footer_border_color color

Color.

layout.footer_border_style string

Style.

Allowed values:

  • solid (Solid)
  • dashed (Dashed)
  • dotted (Dotted)

layout.footer_border_space number

Space. Space between border and footer text

Accessibility

layout.screenreader_text_primary text

Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. “The line chart shows China consistently higher than the other countries since 1990”. Do not replicate your title, since that will also be read by screenreaders.

layout.screenreader_label string

Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders. Added in the form of an "aria-label".

layout.screenreader_hide_primary boolean

Screenreader mode for main visual container. Whether the main visual container is visible to screenreaders. (Text in the header and footer are always available to screenreaders.)

Allowed values:

  • true (Hidden)
  • false (Readable)