I am trying to Make the legend symbol a square or rectangle for a line graph. Example
It's possible to achieve square legend symbols via configuration. Just set legend.symbolRadius value to 0.
0
JSFiddle demo: https://jsfiddle.net/9bzy2qzq/