Commit 0c2716cb authored by Paul Asmuth's avatar Paul Asmuth
Browse files

docs: update element reference

parent f68b96d7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@ def load_prop(p):
  if not "desc_short" in p:
    p["desc_short"] = ""

  if not "name" in p:
    p["name"] = p["prop"]

  return p

def build_elem_page(elem_file):
@@ -29,7 +32,7 @@ def build_elem_page(elem_file):
  write_page(url, html, title=title)

def main():
  elems = glob.glob("manual/elem_*.yaml*")
  elems = glob.glob("manual/elem_*.yaml")

  for elem in elems:
    build_elem_page(elem)
+12 −8
Original line number Diff line number Diff line
@@ -13,6 +13,18 @@ properties:
  # prop: position
  - name: position

  - prop: width
  - prop: height

  # prop: format
  - name: format

  # prop: labels
  - name: labels

  # prop: layout
  - name: layout

  # prop: scale-x
  - name: scale
    inherit: scale
@@ -29,11 +41,3 @@ properties:
  - name: scale-padding
    inherit: scale_padding
  # prop: format
  - name: format

  # prop: labels
  - name: labels

  # prop: layout
  - name: layout

manual/elem_box.yaml

0 → 100644
+52 −0
Original line number Diff line number Diff line
name: box
desc_short: The box element is used for creating (block) layouts
desc: |
  The box element is used for creating (block) layouts. It is not visible
  unless you specify a border. A box element can have any other element as a child.
  It is somewhat comparable to HTML's 'div' element.

demo_img: /examples/barcharts/bars_with_labels.svg

demo: |
  box {
    width: <width>;
    height: <height>;
  }

properties:

  - prop: position

  - prop: width
    name: width

  - prop: height
    name: height

  - prop: margin
  - prop: margin-top
  - prop: margin-right
  - prop: margin-bottom
  - prop: margin-left
  - prop: border-top-color
  - prop: border-right-color
  - prop: border-bottom-color
  - prop: border-left-color
  - prop: border-top-width
  - prop: border-right-width
  - prop: border-bottom-width
  - prop: border-left-width
  - prop: scale-x
  - prop: scale-x-min
  - prop: scale-x-max
  - prop: scale-x-padding
  - prop: scale-x-layout
  - prop: scale-y
  - prop: scale-y-min
  - prop: scale-y-max
  - prop: scale-y-padding
  - prop: scale-y-layout
  - prop: background-color
  - prop: foreground-color
  - prop: text-color
  - prop: border-color
+26 −0
Original line number Diff line number Diff line
name: legend
desc_short: The legend element is used to draw a chart legend.
desc: The legend element is used to draw a chart legend.

demo: |
  legend {
    items: <items>;
  }

properties:

  - prop: position
  - prop: title
  - prop: items
  - prop: text-color
  - prop: border-color
  - prop: item-margin
  - prop: item-margin-top
  - prop: item-margin-right
  - prop: item-margin-bottom
  - prop: item-margin-left
  - prop: color

  # prop: colors
  - name: colors
    inherit: colors
+6 −0
Original line number Diff line number Diff line
@@ -101,9 +101,15 @@ documentation:
      -
        title: "bars"
        url: "/documentation/elements/bars"
      -
        title: "box"
        url: "/documentation/elements/box"
      -
        title: "gridlines"
        url: "/documentation/elements/gridlines"
      -
        title: "legend"
        url: "/documentation/elements/legend"
      -
        title: "lines"
        url: "/documentation/elements/lines"