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

Function create_figure_lines

js/src/test/widget-utils.ts:165–237  ·  view source on GitHub ↗
(manager, x, y, default_scales = {})

Source from the content-addressed store, hash-verified

163}
164
165export async function create_figure_lines(manager, x, y, default_scales = {}) {
166 const layout = await create_model(
167 manager,
168 '@jupyter-widgets/base',
169 'LayoutModel',
170 'LayoutView',
171 'layout_figure1',
172 { _dom_classes: '', width: '400px', height: '500px' }
173 );
174 const scale_x = await create_model_bqscales(
175 manager,
176 'LinearScale',
177 'scale_x',
178 {
179 min: 0,
180 max: 1,
181 allow_padding: false,
182 }
183 );
184 const scale_y = await create_model_bqscales(
185 manager,
186 'LinearScale',
187 'scale_y',
188 {
189 min: 2,
190 max: 3,
191 allow_padding: false,
192 }
193 );
194 const scales = { x: scale_x.toJSON(), y: scale_y.toJSON() };
195 const scales_mark = {
196 x: default_scales['x'] || scale_x.toJSON(),
197 y: default_scales['y'] || scale_y.toJSON(),
198 };
199 const color = null;
200 const size = null;
201 const opacity = null;
202 const rotation = null;
203 const skew = null;
204
205 const linesModel = await create_model_bqplot(manager, 'Lines', 'lines1', {
206 scales: scales_mark,
207 x: x,
208 y: y,
209 color: color,
210 size: size,
211 opacity: opacity,
212 rotation: rotation,
213 skew: skew,
214 visible: true,
215 default_size: 64,
216 preserve_domain: {},
217 _view_module_version: '*',
218 _view_module: 'bqplot',
219 });
220 let figureModel;
221 try {
222 figureModel = await create_model_bqplot(manager, 'Figure', 'figure1', {

Callers 1

lines.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…