MCPcopy Create free account
hub / github.com/bqplot/bqplot / bqSymbol

Function bqSymbol

js/src/Markers.ts:259–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

257}
258
259const bqSymbol = function () {
260 let type = symbolType;
261 let size = symbolSize;
262 let skew = symbolSkew;
263
264 function symbol(d, i) {
265 return (bqSymbolTypes.get(type.call(this, d, i)) || circleSymbol)(
266 size.call(this, d, i),
267 skew.call(this, d, i)
268 );
269 }
270
271 symbol.type = function (x) {
272 if (!arguments.length) {
273 return type;
274 }
275 type = functor(x);
276 return symbol;
277 };
278
279 // size of symbol in square pixels
280 symbol.size = function (x) {
281 if (!arguments.length) {
282 return size;
283 }
284 size = functor(x);
285 return symbol;
286 };
287
288 // skew of symbol, in [0, 1]
289 symbol.skew = function (x) {
290 if (!arguments.length) {
291 return skew;
292 }
293 skew = functor(x);
294 return symbol;
295 };
296
297 return symbol;
298};
299
300export const types = bqSymbolTypes.keys();
301export { bqSymbol as symbol };

Callers 2

renderMethod · 0.85
renderMethod · 0.85

Calls 1

functorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…