Chartjs-How to get rid of the line on top of every point on a line chart (Chart.js)

2👍

This is because you put pointStyle: 'dash' in your dataset attributes.

See Chart.js doc about LineChart data structure (pointStyle is at the last row of the table) :

The style of point. Options are ‘circle’, ‘triangle’, ‘rect’, ‘rectRot’, ‘cross’, ‘crossRot’, ‘star’, ‘line’, and ‘dash’. If the option is an image, that image is drawn on the canvas using drawImage.

You have to choose between the different options.


Note that there is no none option.

If you want to remove the point style, you can :

  • Set the pointRadius attribute of your dataset to 0 (like in this fiddle).
  • Import an image as stated in the second part of the blockquote, which is empty (like this one).

Leave a comment