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

Function generateMockData

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

Source from the content-addressed store, hash-verified

10}
11
12export const generateMockData = (rows: number) =>
13 unpackIntoColumnsAndData([
14 {
15 id: 'rows',
16 type: ColumnType.Numeric,
17 editable: false,
18 data: gendata(i => i, rows)
19 },
20
21 {
22 id: 'ccc',
23 name: ['City', 'Canada', 'Toronto'],
24 type: ColumnType.Numeric,
25 data: gendata(i => i, rows)
26 },
27
28 {
29 id: 'ddd',
30 name: ['City', 'Canada', 'Montréal'],
31 type: ColumnType.Numeric,
32 data: gendata(i => i * 100, rows)
33 },
34
35 {
36 id: 'eee',
37 name: ['City', 'America', 'New York City'],
38 type: ColumnType.Numeric,
39 data: gendata(i => i, rows)
40 },
41
42 {
43 id: 'fff',
44 name: ['City', 'America', 'Boston'],
45 type: ColumnType.Numeric,
46 data: gendata(i => i + 1, rows)
47 },
48
49 {
50 id: 'ggg',
51 name: ['City', 'France', 'Paris'],
52 type: ColumnType.Numeric,
53 editable: true,
54 data: gendata(i => i * 10, rows)
55 },
56
57 {
58 id: 'bbb',
59 name: ['', 'Weather', 'Climate'],
60 type: ColumnType.Text,
61 presentation: 'dropdown',
62 data: gendata(
63 i => ['Humid', 'Wet', 'Snowy', 'Tropical Beaches'][i % 4],
64 rows
65 )
66 },
67
68 {
69 id: 'bbb-readonly',

Callers 2

Style.percy.tsxFile · 0.90
getVirtualizedStateFunction · 0.90

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…