Open Presentation

Search docs

Loading documentation…
    OpenPresentation/opf
    Browse docs
    On this page
    View source

    Chart Mapping

    Series mapping by column name (after any 'fields' selection). Mapping only selects and orders columns; a chart type that plots one series (treemap, funnel, waterfall and the like) still plots the first and names the others in a 'chart-series-dropped' warning, and a pie or doughnut of several series draws nested rings. An unknown name is a 'chart-mapping-unknown-column' error; a series that repeats the category or X column, and an X column on a chart type without an X axis, are dropped with a 'chart-mapping-adapted' warning.

    Metadata

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

    Field index

    FieldTypeReq.Description
    categorystring—The label (category) column. Default: the first column.
    xstring—The X column of an XY (scatter) chart. Default: the second column (the first, when the category is the second column), and only when there are three or more columns: with two, the second column is the one series, plotted against row numbers. An X that leaves no series is plotted as the series with a 'chart-mapping-adapted' warning.
    seriesarray<string>—The plotted columns, in order. Default: every column that is not the category or the X column (or, on a bullet chart, the target column).
    targetstring—Bullet charts: the column that holds each category's target, drawn as a tick across the bar. An unknown name is a 'chart-mapping-unknown-column' error. On other chart types it is ignored with a 'chart-mapping-adapted' warning.

    category

    typestringrequirednodefault—

    The label (category) column. Default: the first column.

    category.json
    {
      "category": "Quarter"
    }

    x

    typestringrequirednodefault—

    The X column of an XY (scatter) chart. Default: the second column (the first, when the category is the second column), and only when there are three or more columns: with two, the second column is the one series, plotted against row numbers. An X that leaves no series is plotted as the series with a 'chart-mapping-adapted' warning.

    x.json
    {
      "x": "Spend"
    }

    series

    typearray<string>requirednodefault—

    The plotted columns, in order. Default: every column that is not the category or the X column (or, on a bullet chart, the target column).

    series.json
    {
      "series": [
        "Revenue",
        "Costs"
      ]
    }

    target

    typestringrequirednodefault—

    Bullet charts: the column that holds each category's target, drawn as a tick across the bar. An unknown name is a 'chart-mapping-unknown-column' error. On other chart types it is ignored with a 'chart-mapping-adapted' warning.

    target.json
    {
      "target": "Target"
    }
    Complete definition constraints
    Schema constraints
    {
      "type": "object",
      "additionalProperties": false,
      "description": "Series mapping by column name (after any 'fields' selection). Mapping only selects and orders columns; a chart type that plots one series (treemap, funnel, waterfall and the like) still plots the first and names the others in a 'chart-series-dropped' warning, and a pie or doughnut of several series draws nested rings. An unknown name is a 'chart-mapping-unknown-column' error; a series that repeats the category or X column, and an X column on a chart type without an X axis, are dropped with a 'chart-mapping-adapted' warning.",
      "properties": {
        "category": {
          "type": "string",
          "description": "The label (category) column. Default: the first column.",
          "examples": [
            "Quarter"
          ]
        },
        "x": {
          "type": "string",
          "description": "The X column of an XY (scatter) chart. Default: the second column (the first, when the category is the second column), and only when there are three or more columns: with two, the second column is the one series, plotted against row numbers. An X that leaves no series is plotted as the series with a 'chart-mapping-adapted' warning.",
          "examples": [
            "Spend"
          ]
        },
        "series": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "description": "The plotted columns, in order. Default: every column that is not the category or the X column (or, on a bullet chart, the target column).",
          "examples": [
            [
              "Revenue",
              "Costs"
            ]
          ]
        },
        "target": {
          "type": "string",
          "description": "Bullet charts: the column that holds each category's target, drawn as a tick across the bar. An unknown name is a 'chart-mapping-unknown-column' error. On other chart types it is ignored with a 'chart-mapping-adapted' warning.",
          "examples": [
            "Target"
          ]
        }
      },
      "examples": [
        {
          "category": "Quarter",
          "series": [
            "Costs",
            "Revenue"
          ]
        },
        {
          "category": "Region",
          "x": "Spend",
          "series": [
            "Revenue"
          ]
        }
      ]
    }