OPF

Search docs

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

    Chart Reference Line

    One explicit reference on the chart's numeric value axis. Labels and titles never select its value, units or placement. A reference at a category or a band between two values is not expressible yet; 'axis' and a separate key are reserved for them.

    Metadata

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

    Field index

    FieldTypeReq.Description
    valueref:FiniteNumberyesFinite value in the associated data-axis units. With format 0%, 0.25 means 25%; 25 means 2500%. Every reference expands automatic bounds when needed.
    axisenum—Secondary requires a combo chart with an actual secondary line series.
    axis · Allowed values
    "value""secondary"
    labelstring—Optional nonblank plain text, shown verbatim. Omission draws no label.
    labelPositionenum—Logical endpoint. Horizontal start/end mirror in RTL; on bars they mean top/bottom. Requires label.
    labelPosition · Allowed values
    "start""end"
    strokeref:Line—The line's color, width and dash, or 'none' to draw only the label. Defaults: the chart-text neutral, 4/3 reference pixels (1 point) and 'dash'. The value expands the axis bounds whether or not the line is drawn.
    stroke · Named choices (see schema for other values and constraints)
    "none"

    value

    typeref:FiniteNumberrequiredyesdefault—

    Finite value in the associated data-axis units. With format 0%, 0.25 means 25%; 25 means 2500%. Every reference expands automatic bounds when needed.

    axis

    typeenumrequirednodefaultvalue

    Secondary requires a combo chart with an actual secondary line series.

    axis · Allowed values
    "value""secondary"
    axis.json
    {
      "axis": "value"
    }

    label

    typestringrequirednodefault—pattern\S

    Optional nonblank plain text, shown verbatim. Omission draws no label.

    labelPosition

    typeenumrequirednodefaultend

    Logical endpoint. Horizontal start/end mirror in RTL; on bars they mean top/bottom. Requires label.

    labelPosition · Allowed values
    "start""end"
    labelPosition.json
    {
      "labelPosition": "start"
    }

    stroke

    typeref:Linerequirednodefault—

    The line's color, width and dash, or 'none' to draw only the label. Defaults: the chart-text neutral, 4/3 reference pixels (1 point) and 'dash'. The value expands the axis bounds whether or not the line is drawn.

    Named choices are not exhaustive. See the schema for other values and constraints.
    stroke · Named choices
    "none"
    stroke (anyOf 2).color, stroke (anyOf 2).color (anyOf 4).color · Named choices
    "accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "dark1", "dark2", "light1", "light2", "hyperlink", "followedHyperlink", "primary", "secondary", "accent", "background", "surface", "surfaceAlt", "text", "textSecondary"
    stroke (anyOf 2).dash · Allowed values
    "solid", "dash", "dot"
    Complete definition constraints
    Schema constraints
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value"
      ],
      "description": "One explicit reference on the chart's numeric value axis. Labels and titles never select its value, units or placement. A reference at a category or a band between two values is not expressible yet; 'axis' and a separate key are reserved for them.",
      "properties": {
        "value": {
          "$ref": "#/$defs/FiniteNumber",
          "description": "Finite value in the associated data-axis units. With format 0%, 0.25 means 25%; 25 means 2500%. Every reference expands automatic bounds when needed."
        },
        "axis": {
          "type": "string",
          "enum": [
            "value",
            "secondary"
          ],
          "default": "value",
          "description": "Secondary requires a combo chart with an actual secondary line series."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S",
          "description": "Optional nonblank plain text, shown verbatim. Omission draws no label."
        },
        "labelPosition": {
          "type": "string",
          "enum": [
            "start",
            "end"
          ],
          "default": "end",
          "description": "Logical endpoint. Horizontal start/end mirror in RTL; on bars they mean top/bottom. Requires label."
        },
        "stroke": {
          "$ref": "#/$defs/Line",
          "description": "The line's color, width and dash, or 'none' to draw only the label. Defaults: the chart-text neutral, 4/3 reference pixels (1 point) and 'dash'. The value expands the axis bounds whether or not the line is drawn."
        }
      },
      "dependentRequired": {
        "labelPosition": [
          "label"
        ]
      }
    }