MCPcopy Index your code
hub / github.com/plotly/dash / generateSpaceMockData

Function generateSpaceMockData

components/dash-table/demo/data.ts:235–290  ·  view source on GitHub ↗
(rows: number)

Source from the content-addressed store, hash-verified

233 ]);
234
235export const generateSpaceMockData = (rows: number) =>
236 unpackIntoColumnsAndData([
237 {
238 id: 'rows',
239 type: ColumnType.Numeric,
240 editable: false,
241 data: gendata(i => i, rows)
242 },
243
244 {
245 id: 'c cc',
246 name: ['City', 'Canada', 'Toronto'],
247 type: ColumnType.Numeric,
248 data: gendata(i => i, rows)
249 },
250
251 {
252 id: 'd:dd',
253 name: ['City', 'Canada', 'Montréal'],
254 type: ColumnType.Numeric,
255 data: gendata(i => i * 100, rows)
256 },
257
258 {
259 id: 'e-ee',
260 name: ['City', 'America', 'New York City'],
261 type: ColumnType.Numeric,
262 data: gendata(i => i, rows)
263 },
264
265 {
266 id: 'f_ff',
267 name: ['City', 'America', 'Boston'],
268 type: ColumnType.Numeric,
269 data: gendata(i => i + 1, rows)
270 },
271
272 {
273 id: 'g.gg',
274 name: ['City', 'France', 'Paris'],
275 type: ColumnType.Numeric,
276 editable: true,
277 data: gendata(i => i * 10, rows)
278 },
279
280 {
281 id: 'b+bb',
282 name: ['', 'Weather', 'Climate'],
283 type: ColumnType.Text,
284 presentation: 'dropdown',
285 data: gendata(
286 i => ['Humid', 'Wet', 'Snowy', 'Tropical Beaches'][i % 4],
287 rows
288 )
289 }
290 ]);
291
292export const mockDataSimple = (rows: number) =>

Callers

nothing calls this directly

Calls 2

unpackIntoColumnsAndDataFunction · 0.85
gendataFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…