OPF
SpecDefinition referenceView source

Dataset

One shared data table: named columns (strings or DataColumn objects with a number format) and rows of scalar cells. Column names are unique ('data-column-duplicate' error). Rich text and styling belong in an inline table.

Metadata

Definition
#/$defs/Dataset
Form
object
Source
spec/schemas/opf.schema.json

Field index

FieldTypeReq.Description
titlestring—Human name of the dataset, shown by editors.
descriptionstring—What the dataset holds.
columnsarray<string | ref:DataColumn>yesOrdered, uniquely named columns.
rowsarray<array<ref:ChartDataCell>>yesRows of scalar cells (string, number, boolean, null); each row aligns by index with columns.
sourceref:DataSourceRef—Optional provenance. Engines never read, fetch or refresh it.

title

typestringrequirednodefault—

Human name of the dataset, shown by editors.

Field fragment · title.json
{
  "title": "Revenue by quarter"
}

description

typestringrequirednodefault—

What the dataset holds.

Field fragment · description.json
{
  "description": "Quarterly revenue and costs, in $M."
}

columns

typearray<string | ref:DataColumn>requiredyesdefault—

Ordered, uniquely named columns.

Field fragment · columns.json
{
  "columns": [
    "Quarter",
    {
      "name": "Revenue",
      "format": "$#,##0.0"
    },
    "Costs"
  ]
}

rows

typearray<array<ref:ChartDataCell>>requiredyesdefault—

Rows of scalar cells (string, number, boolean, null); each row aligns by index with columns.

Field fragment · rows.json
{
  "rows": [
    [
      "Q1",
      12,
      8
    ],
    [
      "Q2",
      18,
      11
    ]
  ]
}

source

typeref:DataSourceRefrequirednodefault—

Optional provenance. Engines never read, fetch or refresh it.

Complete definition constraints
Exact schema constraints
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "columns",
    "rows"
  ],
  "description": "One shared data table: named columns (strings or DataColumn objects with a number format) and rows of scalar cells. Column names are unique ('data-column-duplicate' error). Rich text and styling belong in an inline table.",
  "properties": {
    "title": {
      "type": "string",
      "description": "Human name of the dataset, shown by editors.",
      "examples": [
        "Revenue by quarter"
      ]
    },
    "description": {
      "type": "string",
      "description": "What the dataset holds.",
      "examples": [
        "Quarterly revenue and costs, in $M."
      ]
    },
    "columns": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "$ref": "#/$defs/DataColumn"
          }
        ]
      },
      "minItems": 1,
      "description": "Ordered, uniquely named columns.",
      "examples": [
        [
          "Quarter",
          {
            "name": "Revenue",
            "format": "$#,##0.0"
          },
          "Costs"
        ]
      ]
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/ChartDataCell"
        }
      },
      "description": "Rows of scalar cells (string, number, boolean, null); each row aligns by index with columns.",
      "examples": [
        [
          [
            "Q1",
            12,
            8
          ],
          [
            "Q2",
            18,
            11
          ]
        ]
      ]
    },
    "source": {
      "$ref": "#/$defs/DataSourceRef",
      "description": "Optional provenance. Engines never read, fetch or refresh it."
    }
  }
}