Dataset Column
A named data column: a dataset column or an inline chart data column. Adds to DataColumn what its cells hold (type), what it is for (role) and a unit label. The string form is { "name": value } with nothing declared. A table column header keeps DataColumn.
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| name | string | yes | Column label, used as the series name, the table header and the name 'fields', 'chart.mapping' and data links address. |
| format | ref:NumberFormat | — | Number format of the column's number values (data labels, value axis, table cells, exported workbook). Absent: the General form. |
| type | enum | — | What the column's cells hold. text: strings. number: finite numbers (a string such as "12" is not one). date: time labels (a year, a period, a month, a week or a date, as the time-order rule reads them, and an ISO 8601 date-time). boolean: true or false. null is a gap in any type. A cell of another kind is a 'data-cell-type' warning. A date category column is drawn as time (the title fallback of the time-order rule is skipped); a text or boolean one never is. Absent: undeclared, read from the cells as before.
|
| role | enum | — | What the column is for. dimension: it labels or groups rows (a region, a product, a month). measure: its values are measured and can be aggregated (revenue, count, rate). Time is type 'date' with role 'dimension'. Absent: undeclared. Engines do not draw differently for a role; tools that pick a chart or aggregate a column read it.
|
| unit | string | — | The unit of the column's values, as a label for tools: 'USD', 'ms', 'people'. Engines never print it; 'format' alone decides how a number is drawn. |
name
typestringrequiredyesdefault—
Column label, used as the series name, the table header and the name 'fields', 'chart.mapping' and data links address.
{
"name": "Revenue"
}format
typeref:NumberFormatrequirednodefault—
Number format of the column's number values (data labels, value axis, table cells, exported workbook). Absent: the General form.
type
typeenumrequirednodefault—
What the column's cells hold. text: strings. number: finite numbers (a string such as "12" is not one). date: time labels (a year, a period, a month, a week or a date, as the time-order rule reads them, and an ISO 8601 date-time). boolean: true or false. null is a gap in any type. A cell of another kind is a 'data-cell-type' warning. A date category column is drawn as time (the title fallback of the time-order rule is skipped); a text or boolean one never is. Absent: undeclared, read from the cells as before.
type· Allowed values"text""number""date""boolean"
{
"type": "text"
}role
typeenumrequirednodefault—
What the column is for. dimension: it labels or groups rows (a region, a product, a month). measure: its values are measured and can be aggregated (revenue, count, rate). Time is type 'date' with role 'dimension'. Absent: undeclared. Engines do not draw differently for a role; tools that pick a chart or aggregate a column read it.
role· Allowed values"dimension""measure"
{
"role": "dimension"
}unit
typestringrequirednodefault—
The unit of the column's values, as a label for tools: 'USD', 'ms', 'people'. Engines never print it; 'format' alone decides how a number is drawn.
{
"unit": "USD"
}Complete definition constraints
{
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"description": "A named data column: a dataset column or an inline chart data column. Adds to DataColumn what its cells hold (type), what it is for (role) and a unit label. The string form is { \"name\": value } with nothing declared. A table column header keeps DataColumn.",
"properties": {
"name": {
"type": "string",
"description": "Column label, used as the series name, the table header and the name 'fields', 'chart.mapping' and data links address.",
"examples": [
"Revenue",
"Month"
]
},
"format": {
"$ref": "#/$defs/NumberFormat",
"description": "Number format of the column's number values (data labels, value axis, table cells, exported workbook). Absent: the General form."
},
"type": {
"type": "string",
"enum": [
"text",
"number",
"date",
"boolean"
],
"description": "What the column's cells hold. text: strings. number: finite numbers (a string such as \"12\" is not one). date: time labels (a year, a period, a month, a week or a date, as the time-order rule reads them, and an ISO 8601 date-time). boolean: true or false. null is a gap in any type. A cell of another kind is a 'data-cell-type' warning. A date category column is drawn as time (the title fallback of the time-order rule is skipped); a text or boolean one never is. Absent: undeclared, read from the cells as before."
},
"role": {
"type": "string",
"enum": [
"dimension",
"measure"
],
"description": "What the column is for. dimension: it labels or groups rows (a region, a product, a month). measure: its values are measured and can be aggregated (revenue, count, rate). Time is type 'date' with role 'dimension'. Absent: undeclared. Engines do not draw differently for a role; tools that pick a chart or aggregate a column read it."
},
"unit": {
"type": "string",
"minLength": 1,
"description": "The unit of the column's values, as a label for tools: 'USD', 'ms', 'people'. Engines never print it; 'format' alone decides how a number is drawn.",
"examples": [
"USD",
"ms",
"people"
]
}
},
"examples": [
{
"name": "Month",
"type": "date",
"role": "dimension"
},
{
"name": "Revenue",
"format": "$#,##0",
"type": "number",
"role": "measure",
"unit": "USD"
}
]
}