javascript - Trying to remove border of arc on canvas -
i drew circle using html canvas arc
method, want remove border of circle. tried set linewidth = 0
doesn't seem work. there way remove border of circle in canvas?
$(document).ready(function() { pie_chart = $('#pie_chart'); var p = pie_chart[0].getcontext('2d'); var canvas_width = pie_chart.width(); var canvas_height = pie_chart.height(); p.beginpath(); p.arc(canvas_width/2, canvas_height/2, 150, 0 , math.pi * 2); p.linewidth = 0; p.stroke(); p.fillstyle = '#777'; p.fill(); });
the simple answer is: drop stroke()
call:
p.beginpath(); p.arc(canvas_width/2, canvas_height/2, 150, 0 , math.pi * 2); p.linewidth = 0; //p.stroke(); p.fillstyle = '#777'; p.fill();