---
  name: staticresults
  decscription: For each location min, mean, max for each date
  in_parameters:
    - day1
      type: date
    - day2
      type: date

  out_parameters:
    - mdate
      type: date
    - mtime
      type: time
    - mpsas
      type: float
    - lunar_alt_deg
      type: float
    - lunar_phase
      type: float

  dataservice:
    type: service
    name: RunPostgresQuery
    sql: "SELECT mdate, mtime, mpsas, lunar_alt_deg, lunar_phase FROM clearsky.observatorysqmreading 
WHERE (mdate = ? AND mtime > '12:00:00') OR  (mdate = ? AND mtime < '12:00:00') 
ORDER BY  1,2 ASC"

  renderservice:
    type: embedded
    html: "<div class="container">

  <div>
    <canvas id="res" height=600px width=900px ></canvas>
  </div>
  
  
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  <script>
    
    const ctx = document.getElementById('res');
    new Chart(ctx, {
  type: 'line',
  data: data,
  options: {
    responsive: true,
    interaction: {
      mode: 'index',
      intersect: false,
    },
    stacked: false,
    plugins: {
      title: {
        display: true,
        text: '<<title>>'
      }
    },
    scales: {
      y: {
        type: 'linear',
        display: true,
        position: 'left',
      },
      <<set2>>
    }
  }
})
    
  </script>  
</div>"