Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove the white border from Chart.js pie chart?

I am using Chart.js pie chart and I'd like to remove white lines between slices. Could someone tell me way to do this ? Thanks in advance

I didn't see anything in the documenation.

enter image description here

    <div class="pie-chart">          <div id="canvas-holder">               <canvas id="chart-area" width="250" height="250"/>          </div>     </div> 
like image 221
Ris Avatar asked Mar 31 '16 17:03

Ris


People also ask

How do you remove borders from a pie chart?

In general, CTRL- or right-click on the element (e.g., Chart Area, Plot Area, Legend, Title, Axis Title, Data Labels, or Text Box) and choose Format <element>. In the dialog that opens, set the Border to No Line.


1 Answers

In [email protected] (haven't tested for [email protected]):

const options = {     elements: {         arc: {             borderWidth: 0         }     } }; 
like image 134
grebenyuksv Avatar answered Sep 24 '22 01:09

grebenyuksv