Chartjs-How to plot a line graph with x and y data

0👍

It sounds like you want to make a scatter plot. None of the Chart.js examples show how to make scatter plots, because it doesn’t have that ability. If you must use Chart.js, you could use a scatter plot add-on for it, like that available at https://dima117.github.io/Chart.Scatter/.

If you don’t mind changing your plotting library, you might want to consider something like Highcharts, or Dojo Charting. There are plenty of options, but I find those two to be quite easy to use.

Leave a comment