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

Method draw

js/src/Boxplot.ts:433–452  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

431 }
432
433 draw() {
434 this.set_ranges();
435 // get the visual representation of boxplots, set as state
436 this.prepareBoxPlots();
437
438 // Draw the visual elements with data which was bound
439 this.drawMarkPaths('.boxplot', this.d3el);
440 // Keep the pixel coordinates of the boxes, for interactions.
441 this.xPixels = this.model.mark_data.map(
442 (el) => this.scales.x.scale(el[0]) + this.scales.x.offset
443 );
444
445 const width = this.getBoxWidth() / 2;
446 this.pixelCoords = this.plotData.map((d) => {
447 return [
448 [d.x - width, d.x + width],
449 [d.boxLower, d.boxUpper],
450 ];
451 });
452 }
453
454 private drawMarkPaths(parentClass, selector) {
455 const color = this.model.get('color');

Callers 4

renderMethod · 0.95
set_positional_scalesMethod · 0.95
updateBoxWidthMethod · 0.95
relayoutMethod · 0.95

Calls 4

set_rangesMethod · 0.95
prepareBoxPlotsMethod · 0.95
drawMarkPathsMethod · 0.95
getBoxWidthMethod · 0.95

Tested by

no test coverage detected