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

Method getBoxWidth

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

Source from the content-addressed store, hash-verified

151 }
152
153 private getBoxWidth() {
154 let width = this.model.get('box_width');
155
156 // null box_width means auto calculated box width
157 if (!width) {
158 const plotWidth = this.parent.plotareaWidth;
159 const maxWidth = plotWidth / 10.0;
160 width = plotWidth / (this.model.mark_data.length + 1) / 1.5;
161 width = Math.min(width, maxWidth);
162 }
163
164 return width;
165 }
166
167 compute_view_padding() {
168 //This function sets the padding for the view through the constiables

Callers 3

compute_view_paddingMethod · 0.95
drawMethod · 0.95
drawMarkPathsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected