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

Function create_figure_bars

js/src/test/widget-utils.ts:294–362  ·  view source on GitHub ↗
(manager, x, y)

Source from the content-addressed store, hash-verified

292}
293
294export async function create_figure_bars(manager, x, y) {
295 const layout = await create_model(
296 manager,
297 '@jupyter-widgets/base',
298 'LayoutModel',
299 'LayoutView',
300 'layout_figure1',
301 { _dom_classes: '', width: '400px', height: '500px' }
302 );
303 const scale_x = await create_model_bqscales(
304 manager,
305 'LinearScale',
306 'scale_x',
307 {
308 min: 0,
309 max: 1,
310 allow_padding: false,
311 }
312 );
313 const scale_y = await create_model_bqscales(
314 manager,
315 'LinearScale',
316 'scale_y',
317 {
318 min: 0,
319 max: 3,
320 allow_padding: false,
321 }
322 );
323 const scales = { x: scale_x.toJSON(), y: scale_y.toJSON() };
324 const color = null;
325 const size = null;
326 const opacity = null;
327 const rotation = null;
328 const skew = null;
329
330 const barsModel = await create_model_bqplot(manager, 'Bars', 'bars1', {
331 scales: scales,
332 x: x,
333 y: y,
334 color: color,
335 size: size,
336 opacity: opacity,
337 rotation: rotation,
338 skew: skew,
339 visible: true,
340 default_size: 64,
341 preserve_domain: {},
342 _view_module_version: '*',
343 _view_module: 'bqplot',
344 });
345 let figureModel;
346 try {
347 figureModel = await create_model_bqplot(manager, 'Figure', 'figure1', {
348 scale_x: scales['x'],
349 scale_y: scales['y'],
350 layout: layout.toJSON(),
351 _dom_classes: [],

Callers 2

bars.tsFile · 0.90
interacts.tsFile · 0.90

Calls 5

create_modelFunction · 0.85
create_model_bqscalesFunction · 0.85
create_model_bqplotFunction · 0.85
create_viewFunction · 0.85
display_viewMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…