Chartjs-Is there a way to make a scatter line in ChartJS using LineChart?

1👍

Here is what you can do for it:

var chart = new Chart(ctx, {
   type: 'line',
   data: {
      labels: ['A', 'B', 'C'],
      datasets: [{
         label: 'Test',
         data: [1, 6, 3],
         pointBackgroundColor: 'black',
         pointRadius: 5,
         fill: false,
         showLine: false //<- This is what you need actually
      }]
   }
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js"></script>
<canvas id="ctx"></canvas>

Hope it helps.

Leave a comment