[Chartjs]-Chartjs radar glowing edges effect

0๐Ÿ‘

โœ…

I was able to achieve something close using the following:

                            let draw = Chart.controllers.radar.prototype.draw;
                            Chart.controllers.radar.prototype.draw = function() {
                              let chart = this.chart;
                              let ctx = chart.ctx;
                              let _stroke = ctx.stroke;
                              ctx.stroke = function() {
                                ctx.save();
                                ctx.shadowColor = 'rgba(3, 252, 240, 1)' //ctx.strokeStyle;
                                ctx.shadowBlur = 40;
                                ctx.shadowOffsetX = 0;
                                ctx.shadowOffsetY = 0;
                                _stroke.apply(this, arguments);
                                ctx.restore();
                              };
                              draw.apply(this, arguments);
                              ctx.stroke = _stroke;
                            }
                            

0๐Ÿ‘

for chartjs with line chart. I use this extension. https://www.npmjs.com/package/chartjs-plugin-style

just follow the steps and then you will get it.

Leave a comment