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

Method computeBarWidth

js/src/Hist.ts:150–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 }
149
150 private computeBarWidth() {
151 const xScale = this.scales.sample;
152 let width =
153 (xScale.scale(this.model.maxX) - xScale.scale(this.model.minX)) /
154 this.model.bins;
155
156 if (width >= 10) {
157 width -= 2;
158 }
159
160 return width;
161 }
162
163 relayout() {
164 this.set_ranges();

Callers 3

relayoutMethod · 0.95
drawMethod · 0.95
invert_pointMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected