Another charts JS

by cubicalmonkey

HTML

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.js"></script>
<canvas id="myChart" width="400" height="400"></canvas>
<button onclick='makechart()'>
 make
</button>

JavaScript

function makechart() {



  var ctx = document.getElementById('myChart').getContext('2d');
  var myChart = new Chart(ctx, {
    type: 'line',
    data: json.RxMer,
    data: {
      labels: json.labels,
      datasets: [{
        label: '# of Votes',
        type: 'line',
        pointHitRadius:0.1,
        data: json.RxMer,
        //backgroundColor: [
        //  'rgba(000, 000, 666, 0.2)'
        //],
       // borderColor: [
       //   'rgba(255, 159, 64, 1)'
       // ],
      }]
    },
    options: {
    
    
      scales: {
        x: {
        display: true,
        title: {
          display: true,
          text: 'Month'
        }
      },
      y: {
        display: true,
        title: {
          display: true,
          text: 'Value'
        }
      }
      }
      
      
    }
  });
}

var json...