Simple theme editor
Updated 20 hours ago to v3.1.0 by Flourish team
API information
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/simple-theme-editor
version: 3
Template data
This template does not have any data bindings, so you shouldn't include
data
or bindings
key/value pairs in your
opts
object that is passed to the API. You should specify the
template and template version in the opts
object like:
{ template: "@flourish/simple-theme-editor", version: "3", ... }
Template settings
Options for opts.state
.
Colors
color.categorical_palette colors
Default palette. The default color palette for you theme. Click on the palette, select Edit palette and input your colors as hex codes.
color.categorical_extend boolean
Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once
color.categorical_custom_palette text
Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value.
Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity. Multiple colors can be set using multiple lines. For example:
Party 1: red
Party 2: #4455AA
Party 3: rgb(30,168,26)
color.numeric_type string
Scale type. Allowed values:
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:
color.bin_mode string
Binning mode. Allowed values:
color.bin_count number
Number of bins.
color.bin_thresholds string
Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15".
Bins form as follows:
For "5;10;15", you'll get four bins based on your data's range.
color.sequential_palette string
Palette. Allowed values:
color.sequential_reverse boolean
Reverse.
color.sequential_custom_min color
Minimum color.
color.sequential_custom_max color
Maximum color.
color.sequential_color_space string
Color space. Allowed values:
color.sequential_custom_domain boolean
Domain. Allowed values:
color.sequential_domain_min number
Min.
color.sequential_domain_max number
Max.
color.diverging_palette string
Palette. Allowed values:
color.diverging_reverse boolean
Reverse.
color.diverging_custom_min color
Minimum color.
color.diverging_custom_mid color
Midpoint color.
color.diverging_custom_max color
Maximum color.
color.diverging_color_space string
Color space. Allowed values:
color.diverging_custom_domain boolean
Domain. Allowed values:
color.diverging_domain_min number
Min.
color.diverging_domain_mid number
Mid.
color.diverging_domain_max number
Max.
layout_background_color color
Background color.
text_color color
Text color.
Font
theme_font string
Your theme's default font. This font will apply to the whole graphic by default. You can override this for certain parts of your graphic on a visualization-specific level.
Logo
logo url
Logo. Upload your logo here. It will be displayed in the bottom-right corner of your visualizations.
logo_link_url string
Link. The link your logo should point to.
logo_height number
Height. The height of your logo. In rems.
Company information (required)
company_name string
Company name. Your company's name
External write
external_write.enabled boolean
Store result data externally.
external_write.endpoint string
Storage endpoint. Your external database, store, API or web app endpoint to post data to
external_write.google_apps_script boolean
Use with Google Sheets. In order to send the data from your visualization to a Google Sheet, you will need to create a Google Sheet and add a Google Apps Script to it.
Learn more about this in our External write help doc.
external_write.sheet_name string
Sheet name. Google Sheet name to write to. If a sheet with the given name doesn't exist yet, it will be created and written to.