Studio supports a variety of data types. Instead of being defined directly on fields, data types are defined on Formats. A Format controls formatting along with other behaviour.
const fields = [
{
id: 'athlete',
format: 'textFormat' // textFormat uses the `string` data type
},
// ... other fields
];When using Sync Data and not providing fields, the format is inferred from the data.
Data Types Copy Link
Each of the data types are described in the table below. The input type is the JavaScript type that is supported in the source data. The default Format is the Format that will be used when inferring fields.
| Data Type | Input Type | Default Format |
|---|---|---|
string | string | textFormat |
number | number | integerFormat / decimalFormat |
boolean | boolean | booleanFormat |
date | Date | string | number | dateFormat |
datetime | Date | string | number | dateTimeFormat |
For date and datetime, the string value is expected to be in ISO-8601 format, and the number value is Unix epoch.
See Formatting for how each data type is displayed and how to customise the display format.