Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a line dashed or dotted in chartJS?

I'm using PrimeNG and have a line chart set up that has two data sets. one of those lines is solid, and i'd like to make the other line dashed or dotted. is there an option for this in ChartJS?

like image 885
Dave Avatar asked Jun 26 '17 15:06

Dave


People also ask

Is ChartJS customizable?

If you have a simple dataset with few customization tweaks, it's a great solution. However, as your data visualization and customization needs grow — the more you'll benefit from getting under the hood of ChartJS. We can refer directly to the ChartJS documentation and customize as much as we need.


1 Answers

My bad, took another look at the chartjs docs and found it! You can set it with the borderDash option. Set mine to borderDash: [10,10]

like image 124
Dave Avatar answered Sep 30 '22 12:09

Dave