Open Presentation

Search docs

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

    Reference Line Stroke

    The stroke of a chart reference line: its color, width and dash, or 'none' for no line. The dash takes the preset names a shape outline's Stroke.dash takes (a:prstDash); a custom dash array is not available on a chart line. Every part is optional and falls back to the chart's default.

    Metadata

    Definition
    #/$defs/ReferenceLineStroke
    Form
    2 inclusive forms (anyOf)
    Source
    spec/schemas/opf.schema.json

    Field index

    This definition uses the forms or value constraints below.

    anyOf 1 · const

    No line.

    Exact constraints for anyOf 1
    anyOf 1 schema
    {
      "const": "none",
      "description": "No line."
    }

    anyOf 2 · object

    FieldTypeReq.DefaultDescription
    colorref:ColorRef——Line color: any ColorRef (eight-digit hex keeps its alpha).
    color · Named choices (see schema for other values and constraints)
    "accent1""accent2""accent3""accent4""accent5""accent6""dark1""dark2""light1""light2""hyperlink""followedHyperlink""primary""secondary""accent""background""surface""surfaceAlt""text""textSecondary"
    widthnumber——Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'.
    dashenum——DrawingML preset dash (a:prstDash), by the names Stroke.dash uses. Default dash.
    dash · Allowed values
    "solid""dot""dash""longDash""dashDot""longDashDot""longDashDotDot""sysDot""sysDash""sysDashDot""sysDashDotDot"

    color

    typeref:ColorRefrequirednodefault—

    Line color: any ColorRef (eight-digit hex keeps its alpha).

    Named choices are not exhaustive. See the schema for other values and constraints.
    color, 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"

    width

    typenumberrequirednodefault—

    Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'.

    dash

    typeenumrequirednodefault—

    DrawingML preset dash (a:prstDash), by the names Stroke.dash uses. Default dash.

    dash · Allowed values
    "solid""dot""dash""longDash""dashDot""longDashDot""longDashDotDot""sysDot""sysDash""sysDashDot""sysDashDotDot"
    dash.json
    {
      "dash": "solid"
    }
    Exact constraints for anyOf 2
    anyOf 2 schema
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "color": {
          "$ref": "#/$defs/ColorRef",
          "description": "Line color: any ColorRef (eight-digit hex keeps its alpha)."
        },
        "width": {
          "type": "number",
          "minimum": 0,
          "maximum": 64,
          "description": "Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'."
        },
        "dash": {
          "type": "string",
          "enum": [
            "solid",
            "dot",
            "dash",
            "longDash",
            "dashDot",
            "longDashDot",
            "longDashDotDot",
            "sysDot",
            "sysDash",
            "sysDashDot",
            "sysDashDotDot"
          ],
          "description": "DrawingML preset dash (a:prstDash), by the names Stroke.dash uses. Default dash."
        }
      }
    }
    Complete definition constraints
    Schema constraints
    {
      "description": "The stroke of a chart reference line: its color, width and dash, or 'none' for no line. The dash takes the preset names a shape outline's Stroke.dash takes (a:prstDash); a custom dash array is not available on a chart line. Every part is optional and falls back to the chart's default.",
      "anyOf": [
        {
          "const": "none",
          "description": "No line."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "color": {
              "$ref": "#/$defs/ColorRef",
              "description": "Line color: any ColorRef (eight-digit hex keeps its alpha)."
            },
            "width": {
              "type": "number",
              "minimum": 0,
              "maximum": 64,
              "description": "Line width in reference pixels at a 720-pixel short edge. 0 draws no line, the same as 'none'."
            },
            "dash": {
              "type": "string",
              "enum": [
                "solid",
                "dot",
                "dash",
                "longDash",
                "dashDot",
                "longDashDot",
                "longDashDotDot",
                "sysDot",
                "sysDash",
                "sysDashDot",
                "sysDashDotDot"
              ],
              "description": "DrawingML preset dash (a:prstDash), by the names Stroke.dash uses. Default dash."
            }
          }
        }
      ],
      "examples": [
        "none",
        {
          "width": 2
        },
        {
          "color": "accent2",
          "width": 2,
          "dash": "longDashDot"
        }
      ]
    }
    value · Named choices (see schema for other values and constraints)
    "none"