MCPcopy Index your code
hub / github.com/bqplot/bqplot / draw

Method draw

js/src/Pie.ts:287–306  ·  view source on GitHub ↗
(animate?: boolean)

Source from the content-addressed store, hash-verified

285 }
286
287 draw(animate?: boolean) {
288 this.set_ranges();
289 this.positionCenter(animate);
290
291 this.d3Pie = d3
292 .pie<Slice>()
293 .startAngle((this.model.get('start_angle') * 2 * Math.PI) / 360)
294 .endAngle((this.model.get('end_angle') * 2 * Math.PI) / 360)
295 .value((d: Slice) => {
296 return d.size;
297 });
298
299 if (!this.model.get('sort')) {
300 this.d3Pie.sort(null);
301 }
302
303 this.updateSlices(animate);
304 this.updateLabels(animate);
305 this.updatePolylines(animate);
306 }
307
308 private updateSlices(animate?: boolean) {
309 const that = this;

Callers 3

renderMethod · 0.95
set_positional_scalesMethod · 0.95
create_listenersMethod · 0.95

Calls 5

set_rangesMethod · 0.95
positionCenterMethod · 0.95
updateSlicesMethod · 0.95
updateLabelsMethod · 0.95
updatePolylinesMethod · 0.95

Tested by

no test coverage detected