Toggle menu

D3 Chart

This field uses D3.js (opens new window) to draw charts, graphs and maps from supplied JSON data. The field will handle loading the external libraries. The remaining code must be supplied in the script property.

Properties

LabelDescriptionType Name
SummaryA short description of what the field does, displayed in the forms designer to help identify itSUMMARY
WidthThe width of the chart. Either an integer for a fixed width in pixels or any valid HTML measureWIDTH
HeightThe height of the chart. Either an integer for a fixed width in pixels or any valid HTML measureHEIGHT
DefaultDefault data value for the chartDEFAULT
Default FunctionA JavaScript function that may be used to calculate the default field value.

This function is executed server-side when the field HTML is being generated and is useful for setting the default value when the DEFAULT property is insufficient
DEFFUNC
Script FunctionsJavaScript to draw the graph and manipulate the dataCUSTOMFIELDFNS
HandlersHandlers called when field first displayed or value changedHANDLERS
Additional Styling ModifierAn optional CSS modifier for the field. See Common Field Properties for an exampleADDITIONALSTYLINGMODIFIER
DocumentationAdd documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an exampleDOCUMENTATION
Last modified on July 08, 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon