Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 10.6 KB

controls-reference.md

File metadata and controls

19 lines (10 loc) · 10.6 KB

@controls reference

While it's possible to build controls using the Basic Editor, using the Advanced Editor is the only way to unlock the full flexibility of controls. This guide lists each property that can be used in the Advanced Editor, each possible value the properties can accept, and which @controls can recognize the properties and values.

There are two reference tables in this guide—the first lists properties for static controls (nothing happens when map readers click on these controls), and the second lists properties for interactive controls (map readers can interact with the map by clicking on these controls).

All values are unitless.

If you find a property or a value that's not documented here, let us know!

Jump to the reference for interactive controls.

Static controls

PropertyDescriptionValid ValuesLegendImageLabelTextTitleSNA Dashboard
background-colorDefines background color of controlcolortruetruetruetruetruetrue
colorDefines color of control's textcolortruetruetruetruetruetrue
font-familyDefines font family of control's textfamily-name generic-familytruetruetruetruetruetrue
font-sizeDefines size of control's textnumbertruetruetruetruetruetrue
font-styleDefines style of control's textnormal italictruetruetruetruetruetrue
font-weightDefines weight of control's textnumbertruetruetruetruetruetrue
heightDefines height of controlnumbertruetruetruetruetruetrue
marginDefines space between the control and other controls on the mapnumbertruetruetruetruetruetrue
metricsDefines which metrics will be included in the dashboardelement-count connection-count density reciprocity diameter average-degree average-path-lengthtruetruetruetruetruetrue
opacityDefines opacity of the control0..1truetruetruetruetruetrue
paddingDefines space between the control's border and its contentsnumbertruetruetruetruetruetrue
srcDefines the source of the imageurltruetruetruetruetruetrue
text-alignDefines alignment of text within the controlcenter left righttruetruetruetruetruetrue
valueAny plain text string. Markdown and some HTML allowed.stringtruetruetruetruetruetrue
widthDefines width of controlnumbertruetruetruetruetruetrue

Interactive controls

PropertyDescriptionValid ValuesFilterShowcaseFocusClusterTagged TimelineView Toggle
asDefines how the control is presentedlabels buttons dots dropdowntruetruetruetruetruetrue
background-colorDefines background color of controlcolortruetruetruetruetruetrue
byDefines the field to filter, showcase, or cluster by''Field Name'truetruetruetruetruetrue
colorDefines color of control's text (labels, placeholders, and summaries only)colortruetruetruetruetruetrue
defaultDefines which options should be selected by defaultnone show-all select all ''field value 1', 'field value 2',...truetruetruetruetruetrue
exceptAllows you to remove field values from the available choices''field value 1', 'field value 2',...truetruetruetruetruetrue
font-familyDefines font family of control's text (labels, placeholders, and summaries only)family-name generic-familytruetruetruetruetruetrue
font-sizeDefines size of control's text (labels, placeholders, and summaries only)numbertruetruetruetruetruetrue
font-styleDefines style of control's text (labels, placeholders, and summaries only)normal italictruetruetruetruetruetrue
font-weightDefines weight of control's text (labels, placeholders, and summaries only)numbertruetruetruetruetruetrue
heightDefines height of controlnumbertruetruetruetruetruetrue
labelAdds a label above the control'My Label'truetruetruetruetruetrue
marginDefines space between the control and other controls on the mapnumbertruetruetruetruetruetrue
modeControls how the selection is showcased. normal is the default and showcases the selection plus any connections between the showcased elements. loose showcases the selection plus neighboring elements. strict only showcases the selection itself.normal loose strictfalsetruefalsefalsefalsefalse
multipleControls whether more than one option can be selected at a timetrue false match-alltruetruetruetruetruetrue
onlyAllows you to explicitly define which field values should be included as available choices''field value 1', 'field value 2',...truetruetruetruetruetrue
opacityDefines opacity of the control0..1truetruetruetruetruetrue
optionsAllows you to explicitly define which options should be included as available choices''partial-view-1', 'partial-view-2',...truetruetruetruetruetrue
outDefines the level of connections you'd like to see (out 1: first-degree only, out 2: first- and second-degree, etc.)numberfalsefalsetruefalsefalsefalse
paddingDefines space between the control's border and its contentsnumbertruetruetruetruetruetrue
placeholderThe text to display when nothing is selected
(for as: dropdown only)
stringtruetruetruetruetruetrue
rangeDefines the years that should be includedyear..yearfalsefalsefalsefalsetruefalse
summarySummarizes the options that have been selected
(for as: dropdown only)
stringtruetruetruetruetruetrue
targetDefines which items will be affected by the controlselectortruefalsefalsefalsefalsefalse
widthDefines width of controlnumbertruetruetruetruetruetrue