Commit e3b5e913 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

add documentation for the 'chart/areas' element

parent d0366d10
Loading
Loading
Loading
Loading
+96 −0
Original line number Diff line number Diff line
name: chart/areas
example: charts-basic/areachart
desc: |
  The `chart/areas` element is used to create area charts.

reference: |
  (chart/areas <options>)

option_summary: true

properties:
  - title: "Area Options"
    anchor: area-options
    properties:
      - name: data-x
        desc: |
          Set the 'x' dataset for the plot. The 'x' dataset will be used to
          calculate the horizontal position of geometry.
        desc_code: |
          data-x (<values>...)
          data-x (csv <file> <column>)
        examples: |
          ;; list of static values
          data-x (10px 20px 30px)

          ;; load a csv file
          data-x (csv myfile.csv mycolumn)
      - name: data-x1
        alias: data-x
      - name: data-x2
        desc: |
          Set the 'x2' dataset for the plot. The 'x2' dataset will be used to
          calculate the horizontal position of geometry.
        desc_code: |
          data-x2 (<values>...)
          data-x2 (csv <file> <column>)
        examples: |
          ;; list of static values
          data-x2 (10px 20px 30px)

          ;; load a csv file
          data-x2 (csv myfile.csv mycolumn)
      - name: data-y
        desc: |
          Set the 'y' dataset for the plot. The 'y' dataset will be used to
          calculate the vertical position of geometry.
        desc_code: |
          data-y (<values>...)
          data-y (csv <file> <column>)
        examples: |
          ;; list of static values
          data-y (10px 20px 30px)

          ;; load a csv file
          data-y (csv myfile.csv mycolumn)
      - name: data-y1
        alias: data-y
      - name: data-y2
        desc: |
          Set the 'y2' dataset for the plot. The 'y2' dataset will be used to
          calculate the vertical position of geometry.
        desc_code: |
          data-y2 (<values>...)
          data-y2 (csv <file> <column>)
        examples: |
          ;; list of static values
          data-y2 (10px 20px 30px)

          ;; load a csv file
          data-y2 (csv myfile.csv mycolumn)
      - name: direction
        desc: |
          Set the area 'direction'.
        desc_code: |
          direction [horizontal|vertical]
        examples: |
          ;; draw a vertical area chart
          direction vertical
      - name: color
        alias: colors
      - name: colors
        desc: |
          Set the area colors.
        desc_code: |
          colors (<values>...)
          colors (csv <file> <column>)
        examples: |
          ;; list of static values
          colors (#0f0 #00f #f00)

          ;; load a csv file
          colors (csv myfile.csv mycolors)

  - title: "Scale Options"
    anchor: scale-options
    inherit: ["elements/chart/layout", "scale-options"]
+3 −0
Original line number Diff line number Diff line
@@ -111,6 +111,9 @@ documentation:
      -
        title: "chart/axis-left"
        url: "/documentation/elements/chart/axis-left"
      -
        title: "chart/areas"
        url: "/documentation/elements/chart/areas"
      -
        title: "chart/lines"
        url: "/documentation/elements/chart/lines"