title: Chart Js - Group(average) y axis values against same x axis in line/scatter chart
body: <p>I have datasets with x, y values x denotes date y denotes values.and i have successfully generated a chart. look at the pic attached below </p>
  
  <p><a href="https://i.stack.imgur.com/ckYvh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ckYvh.png" alt="**Generated result**"></a></p>
  
  <p>I'm using this code to generate the chart (generated using the above chart)</p>
  
  <pre><code> var config = {
        type: 'scatter',
        data: {
          //labels: this.HoursStrings,
          datasets: [{
            data: yserires, // example data [{x:2019/01/02,y:12},{x:2019/01/02,y:12}}]                                
            fill: true,
            borderColor: "#3e82f7",
            yAxesGroup: "1"
          }]
        },
        options: {
           responsive: true,
          title: {
            display: false,
          },
          legend: {
            display: false
          },
          showLines: true, 
          tooltips: {
            mode: 'index',
            intersect: true,
            callbacks: {
              label: function (tooltipItem, data) {
                var value = data.datasets[0].data[tooltipItem.index];
                var day = moment(new Date(value.x)).format(self.timeformat);
                var point = value.y + " " + self.unityType
                return point;
              }
            } //
          },
          hover: {
            mode: 'nearest',
            intersect: true
          },
          scales: {
            xAxes: [{
              display: true,
              type: 'time',
              time: {
                unit: self.timeUnit
              },
              ticks: {
                beginAtZero: true
              }
            }],
            yAxes: [{
              display: true,
              ticks: {
                beginAtZero: true,
                userCallback: function (value, index, values) {
                  return self.roundValues(value) + " " + self.unityType
                }
              }
            }]
          },
          elements: {
            line: {
                tension: .1, // bezier curves
            }
         }
        }
      };
  
      setTimeout(() =&gt; {
        var ctx = document.getElementById("canvas");
        this.chart = new Chart(ctx, config);
        this.chart.update()
      }, 50)
  </code></pre>
  
  <p><strong>Expected Result</strong></p>
  
  <p>how can group different y-axis values against the same x-axis values (<strong><em>should be one single value like the average of y-axis</em></strong>) is there any <strong><em>build in functions available in chart js</em></strong> or I need to group those value before binding the chart.</p>
  
  <p><strong>Note: The date should be grouped (averaged) by day/hour/week/month</strong>
  like below image 
  <a href="https://i.stack.imgur.com/wcwFm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wcwFm.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Hlh9Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hlh9Y.png" alt="enter image description here"></a></p>