apiVersion: influxdata.com/v2alpha1
kind: Dashboard
metadata:
  name:  dash-0
spec:
  description: a dashboard w/ single mosaic chart
  charts:
    - kind:   Mosaic
      name:   mosaic chart
      note: mosaic note
      noteOnEmpty: true
      prefix: sumtin
      suffix: days
      xPos:  1
      yPos:  2
      generateXAxisTicks:
        - xTotalTicks
        - xTickStart
        - xTickStep
      xCol: _time
      hoverDimension: "y"
      xTotalTicks: 15
      xTickStart: 0
      xTickStep: 1000
      yCol: _value
      width:  6
      height: 3
      yLabelColumnSeparator: ","
      yLabelColumns:
        - foo
      ySeriesColumns:
        - _value
        - foo
      legendColorizeRows: true
      legendHide: false
      legendOpacity: 1.0
      legendOrientationThreshold: 5
      queries:
        - query: >
            from(bucket: v.bucket)  |> range(start: v.timeRangeStart)  |> filter(fn: (r) => r._measurement == "mem")  |> filter(fn: (r) => r._field == "used_percent")  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)  |> yield(name: "mean")
      colors:
        - hex: "#8F8AF4"
        - hex: "#F4CF31"
        - hex: "#FFFFFF"
      axes:
        - name : "x"
          label: x_label
          prefix: x_prefix
          suffix: x_suffix
          domain:
            - 0
            - 10
        - name: "y"
          label: y_label
          prefix: y_prefix
          suffix: y_suffix
          domain:
            - 0
            - 100
