$(function (){
  google.charts.load('current', {packages: ['corechart', 'line']});
  google.charts.setOnLoadCallback(drawMapUseFromDayChart);
})

function drawMapUseFromDayChart() {
  var dataHeader = [['날짜', '사용량']];
  var chartData = google.visualization.arrayToDataTable(dataHeader.concat(dayMapUseDataList));
  var options = {
    legend: { position: 'bottom' }
  };
  var chart = new google.visualization.LineChart(document.getElementById('mapUseFromDayChart'));
  chart.draw(chartData, options);
  /*$.ajax({
    url: "/admin/dayMapUseData",
    type: "GET",
    data:{
      searchStartDate:"2022-02-18",
      searchEndDate:"2022-03-04"
    },
    dataType:"json",
    success : function(data, textStatus, jqXHR) {
      console.log(data);
      var dataHeader = [['날짜', '사용량']];
      var chartData = google.visualization.arrayToDataTable(dataHeader.concat(data));
      var options = {
        legend: { position: 'bottom' }
      };
      var chart = new google.visualization.LineChart(document.getElementById('mapUseFromDayChart'));
      chart.draw(chartData, options);
    },
    error: function (request, status, error) {

    }
  });*/
}