title: Trying to get total sum based on months on ApexCharts with Php
body: <p>I'm trying to display with <a href="https://apexcharts.com/javascript-chart-demos/area-charts/spline/" rel="nofollow noreferrer">ApexCharts</a> the total sum from DB based on date month and display into ApexCharts, but what i have tried is not working, im new with this, see the mysql db image and apexcharts link to see how is working and what i want to achive. Any help appreciated.</p>
  
  <p>My Myqsl DB:
  <a href="https://i.stack.imgur.com/loB1A.png" rel="nofollow noreferrer">See image</a></p>
  
  <p>getchart Php Code: </p>
  
  <pre><code>    $stats = array();
  
      $query = "SELECT SUM(totalprice), `timestamp` AS sum FROM `orders`";
      $statement = $db-&gt;query($query);
  
      while ($row = $db-&gt;fetch($statement))
      {
  
            $row_array  = $row['sum'];
            $row_array  = $row['timestamp'];
           array_push($stats,$row_array);
  
      }
  echo json_encode($stats);
  </code></pre>
  
  <p>Js Code:</p>
  
  <pre><code>$.getJSON('../../shop/js/chart/getchart.php', function (json) {
      var options = {
          series: [{
              name: 'sales',
              data: json
          }],
          chart: {
              type: 'area',
              height: 350,
              stacked: false,
          },
          stroke: {
              show: true,
              curve: 'smooth',
              lineCap: 'butt',
              colors: undefined,
              width: 3,
              dashArray: 0,
          },
          markers: {
              size: 4,
              colors: ["#765be6"],
              strokeColors: "#fff",
              strokeWidth: 1,
              hover: {
                  size: 7,
              }
          },
          fill: {
              type: 'gradient',
              gradient: {
                  shade: 'dark',
                  gradientToColors: ['#03adf7'],
                  shadeIntensity: 5,
                  inverseColors: true,
                  type: 'vertical',
                  opacityFrom: .7,
                  opacityTo: .8,
              },
          },
          dataLabels: {
              enabled: false
          },
          plotOptions: {
              bar: {
                  horizontal: false,
                  columnWidth: '25%',
                  endingShape: 'rounded'
              },
          },
          responsive: [{
              breakpoint: 480,
              options: {
                  legend: {
                      position: 'bottom',
                      offsetX: 0,
                      offsetY: 0
                  }
              }
          }],
          xaxis: {
              categories: ['Ian', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
          },
          colors: ['#765be6'],
  
      };
      var chart = new ApexCharts(document.querySelector("#sales"), options);
      chart.render();
  });
  </code></pre>