-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
203 lines (198 loc) · 3.92 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<style>
canvas {
overflow: auto;
}
</style>
<canvas id="myCanvas"></canvas>
<script src="canvas-table.js"></script>
<script>
function generateTableData(length) {
var tableData = [];
var crmData = [
[
"ID",
"First Name",
"Last Name",
"Email",
"Phone",
"Company",
"Address",
"City",
"State",
"Zip",
"Country",
"Industry",
"Revenue",
"Employees",
"Stage",
"Source",
"Created",
"Modified",
"Assigned To",
"Lead Score",
"Lead Grade",
"Lead Status",
"Opportunity Value",
"Opportunity Stage",
"Opportunity Source",
"Opportunity Created",
"Opportunity Modified",
"Opportunity Assigned To",
"Account Owner",
"Account Manager",
"Account Created",
"Account Modified",
"Account Assigned To",
],
[
1,
"John",
"Smith",
"555-1234",
"ABC Company",
"123 Main St.",
"Anytown",
"CA",
"12345",
"USA",
"Manufacturing",
"$10M",
100,
"Qualified",
"Website",
"2022-01-01",
"2022-01-05",
"Alice Smith",
50,
"A",
"New",
"$1M",
"Prospect",
"Referral",
"2022-01-03",
"2022-01-04",
"Bob Johnson",
"Alice Smith",
"Jane Doe",
"2022-01-01",
"2022-01-02",
"Alice Smith",
],
[
2,
"Jane",
"Doe",
"555-5678",
"XYZ Inc.",
"456 Oak St.",
"Othertown",
"NY",
"67890",
"USA",
"Software",
"$5M",
50,
"Qualified",
"Trade Show",
"2022-01-02",
"2022-01-06",
"Bob Johnson",
75,
"B",
"Follow-up",
"$500K",
"Negotiation",
"Website",
"2022-01-04",
"2022-01-05",
"Bob Johnson",
"Bob Johnson",
"Bob Johnson",
"2022-01-01",
"2022-01-03",
"Bob Johnson",
],
[
3,
"Bob",
"Johnson",
"555-9876",
"Acme Corp.",
"789 Elm St.",
"Anycity",
"TX",
"34567",
"USA",
"Retail",
"$2M",
25,
"Prospect",
"Referral",
"2022-01-03",
"2022-01-07",
"Jane Doe",
25,
"C",
"New",
"$250K",
"Prospect",
"Website",
"2022-01-05",
"2022-01-06",
"Jane Doe",
"Alice Smith",
"Tom Wilson",
"2022-01-02",
"2022-01-05",
"Jane Doe",
],
[
4,
"Mary",
"Jones",
"555-4321",
"EFG Enterprises",
"101 Maple St.",
"Sometown",
"CA",
"45678",
"USA",
"Healthcare",
"$1M",
10,
"Contacted",
"Website",
"2022-01-04",
"2022-01-08",
"Tom Wilson",
10,
"D",
"New",
"$100K",
"Prospect",
"Trade Show",
"2022-01-06",
"2022-01-07",
"Tom Wilson",
"Bob Johnson",
"Alice Smith",
"2022-01-03",
"2022-01-06",
"Tom Wilson",
],
// more rows...
];
// Loop through the desired length and select a random row from the CRM data
for (var i = 0; i < length; i++) {
var randomIndex = Math.floor(Math.random() * crmData.length);
tableData.push(crmData[randomIndex]);
}
return tableData;
}
var canvas = document.getElementById("myCanvas");
canvasTable.render(generateTableData(1000), canvas, 800, 600);
</script>