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

Method midAngleLocation

js/src/Pie.ts:278–285  ·  view source on GitHub ↗
(arc_data)

Source from the content-addressed store, hash-verified

276 }
277
278 private midAngleLocation(arc_data) {
279 // decides if the location of the mid angle of the arc is toward left or right (to aid the
280 // placement of label text)
281 const mid_angle = (arc_data.startAngle + arc_data.endAngle) / 2;
282 return mid_angle > Math.PI || (mid_angle < 0 && mid_angle > -Math.PI)
283 ? 'left'
284 : 'right';
285 }
286
287 draw(animate?: boolean) {
288 this.set_ranges();

Callers 3

updateRadiusMethod · 0.80
updateLabelsMethod · 0.80
updatePolylinesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected