This solution only works if you have a local version of Chart.js, since it needs to edit the function in the library source code, which cannot be done if you import it from the CDN.
To achieve what you want, you need to edit the drawLegendBox function ( link to source here ).
First, as if you want to make the legend pointStyle, add useLineStyle and set it to true as follows:
options: { legend: { labels : { useLineStyle: true } } }
Then you need to go to the local version of Chart.js (obvisouly, you cannot edit it if you import it from the CDN) and search for the drawLegendBox function (on Chart.js v2.2.1, this is approximately line 6460).
Scroll down a bit to see something like this:
if (opts.labels && opts.labels.usePointStyle) {
And add this between two conditions:
else if (opts.labels && opts.labels.useLineStyle) { ctx.strokeRect(x, y + fontSize / 2, boxWidth, 0); }
In this editing, every time you set the useLineStyle parameter to true, the legend fields will be drawn as strings, as the following screenshot:

source share