/*
 * Copyright (C) Sapphirecode - All Rights Reserved
 * This file is part of appreports which is released under GPL-3.0-or-later.
 * See file 'LICENSE' for full license details.
 * Created by Timo Hocker <timo@scode.ovh>, August 2020
 */

export default {
  sources:  [
    {
      name:   'default',
      limit:  140,
      offset: 0
    },
    {
      name:   'secondary',
      limit:  10,
      offset: 0
    }
  ],
  displays: [
    {
      source:            'default',
      type:              'chart',
      remove_duplicates: true,
      x:                 'timestamp',
      y:                 [
        {
          label:     'temperature',
          field:     'data/temperature',
          color:     '#ff0000',
          fill:      '#0000',
          min_value: 15,
          max_value: 30
        },
        {
          label:     'humidity',
          field:     'data/humidity',
          color:     '#0000ff',
          fill:      '#0000',
          min_value: 20,
          max_value: 80
        },
        {
          label: 'light',
          field: 'data/light',
          color: '#999',
          fill:  '#0000'
        }
      ]
    },
    {
      source:  'secondary',
      type:    'table',
      columns: [
        'timestamp',
        'data'
      ]
    }
  ]
};