Commit 671d01b4 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

add documentation for the legend element

parent 02529b7c
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
@@ -53,6 +53,51 @@ properties:
        examples: |
          ;; set the left margin to 2em
          margin 2em
      - name: padding
        desc: |
          Set the element's top/right/bottom/left padding. See the [measure](#FIXME) page
          for more details on valid values.
        desc_code: |
          padding <measure>
        examples: |
          ;; set the padding to 2em
          padding 2em
      - name: padding-top
        desc: |
          Set the element's top padding. see the [measure](#fixme) page
          for more details on valid values.
        desc_code: |
          padding <measure>
        examples: |
          ;; set the top padding to 2em
          padding 2em
      - name: padding-right
        desc: |
          Set the element's right padding. see the [measure](#fixme) page
          for more details on valid values.
        desc_code: |
          padding <measure>
        examples: |
          ;; set the right padding to 2em
          padding 2em
      - name: padding-bottom
        desc: |
          Set the element's bottom padding. see the [measure](#fixme) page
          for more details on valid values.
        desc_code: |
          padding <measure>
        examples: |
          ;; set the bottom padding to 2em
          padding 2em
      - name: padding-left
        desc: |
          Set the element's left padding. see the [measure](#fixme) page
          for more details on valid values.
        desc_code: |
          padding <measure>
        examples: |
          ;; set the left padding to 2em
          padding 2em

  - title: "Background Options"
    anchor: background-options
+61 −0
Original line number Diff line number Diff line
name: legend
desc: |
  The `legend` element is a container object for legends.

reference: |
  (plot <options>)

option_summary: true
properties:
  - title: "Legend Options"
    anchor: legend-options
    properties:
      - name: position
        desc: |
          Set the legend position.
        desc_code: |
          position ([top|center|bottom] [left|center|right])
        examples: |
          ;; set the position to top left
          position (top left)
      - name: item
        desc: |
          Add a `legend/item` element to the legend. See the [legend/item](./item)
          element for options.
        desc_code: |
          item (<options>)
      - name: item-column-padding
        desc: |
          Set the item column padding. See the [measure](#FIXME) page
          for more details on valid values.
        desc_code: |
          item-column-padding <measure>
        examples: |
          ;; set the column padding to 1em
          item-column-padding 2em
      - name: item-row-padding
        desc: |
          Set the item row padding. See the [measure](#FIXME) page
          for more details on valid values.
        desc_code: |
          item-row-padding <measure>
        examples: |
          ;; set the row padding to 1em
          item-row-padding 2em
      - name: extra
        desc: |
          Add custom elements to the legend
        desc_code: |
          extra (<element>)

  - title: "Layout Options"
    anchor: layout-options
    inherit: ["elements/layout/box", "layout-options"]

  - title: "Background Options"
    anchor: background-options
    inherit: ["elements/layout/box", "background-options"]

  - title: "Border Options"
    anchor: border-options
    inherit: ["elements/layout/box", "border-options"]
+4 −0
Original line number Diff line number Diff line
@@ -152,6 +152,10 @@ documentation:
      -
        section_title: "Legends"
        pages:
          -
            title: "legend"
            url: "/documentation/elements/legend"
            api_ref: true
          -
            title: "legend/item"
            url: "/documentation/elements/legend/item"