@pie-lib/plot 2.8.1-beta.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +0 -335
- package/CHANGELOG.md +145 -1
- package/lib/draggable.js +65 -0
- package/lib/draggable.js.map +1 -0
- package/lib/graph-props.js +53 -0
- package/lib/graph-props.js.map +1 -0
- package/lib/grid-draggable.js +381 -0
- package/lib/grid-draggable.js.map +1 -0
- package/lib/index.js +59 -0
- package/lib/index.js.map +1 -0
- package/lib/label.js +176 -0
- package/lib/label.js.map +1 -0
- package/lib/root.js +422 -0
- package/lib/root.js.map +1 -0
- package/lib/trig.js +196 -0
- package/lib/trig.js.map +1 -0
- package/lib/types.js +68 -0
- package/lib/types.js.map +1 -0
- package/lib/utils.js +232 -0
- package/lib/utils.js.map +1 -0
- package/package.json +3 -4
- package/src/root.jsx +0 -2
package/CHANGELOG.json
CHANGED
|
@@ -1,339 +1,4 @@
|
|
|
1
1
|
[
|
|
2
|
-
{
|
|
3
|
-
"type": "fix",
|
|
4
|
-
"scope": null,
|
|
5
|
-
"subject": "rm child prepack in favour of root prepack",
|
|
6
|
-
"merge": null,
|
|
7
|
-
"header": "fix: rm child prepack in favour of root prepack",
|
|
8
|
-
"body": null,
|
|
9
|
-
"footer": null,
|
|
10
|
-
"notes": [],
|
|
11
|
-
"hash": "381d8d6485269b641d8d4655148966d2e70803be",
|
|
12
|
-
"gitTags": "",
|
|
13
|
-
"committerDate": "2019-03-15 09:51:11 +0000",
|
|
14
|
-
"isTagged": true,
|
|
15
|
-
"tag": "@pie-lib/plot@0.1.12"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "chore",
|
|
19
|
-
"scope": null,
|
|
20
|
-
"subject": "get packages to call changelog function on prepack",
|
|
21
|
-
"merge": null,
|
|
22
|
-
"header": "chore: get packages to call changelog function on prepack",
|
|
23
|
-
"body": null,
|
|
24
|
-
"footer": null,
|
|
25
|
-
"notes": [],
|
|
26
|
-
"hash": "8828f01f2d16d29404ba837c1de40d09e7230ec5",
|
|
27
|
-
"gitTags": "",
|
|
28
|
-
"committerDate": "2019-03-14 12:40:05 +0000",
|
|
29
|
-
"isTagged": true,
|
|
30
|
-
"tag": "@pie-lib/plot@0.1.10"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"type": "chore",
|
|
34
|
-
"scope": null,
|
|
35
|
-
"subject": "call changelog on prepack",
|
|
36
|
-
"merge": null,
|
|
37
|
-
"header": "chore: call changelog on prepack",
|
|
38
|
-
"body": null,
|
|
39
|
-
"footer": null,
|
|
40
|
-
"notes": [],
|
|
41
|
-
"hash": "b672c012de096c55b765a765f758da3fc5df2f90",
|
|
42
|
-
"gitTags": "",
|
|
43
|
-
"committerDate": "2019-03-13 23:00:44 +0000",
|
|
44
|
-
"isTagged": true,
|
|
45
|
-
"tag": "@pie-lib/plot@0.1.10"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"type": "chore",
|
|
49
|
-
"scope": null,
|
|
50
|
-
"subject": "generate changelog.json instead of markdown",
|
|
51
|
-
"merge": null,
|
|
52
|
-
"header": "chore: generate changelog.json instead of markdown",
|
|
53
|
-
"body": null,
|
|
54
|
-
"footer": null,
|
|
55
|
-
"notes": [],
|
|
56
|
-
"hash": "eaa5019a11f70c53425d55856bd3b940237f8c7d",
|
|
57
|
-
"gitTags": "",
|
|
58
|
-
"committerDate": "2019-03-13 17:24:09 +0000",
|
|
59
|
-
"isTagged": true,
|
|
60
|
-
"tag": "@pie-lib/plot@0.1.10"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"type": "fix",
|
|
64
|
-
"scope": null,
|
|
65
|
-
"subject": "force version bump",
|
|
66
|
-
"merge": null,
|
|
67
|
-
"header": "fix: force version bump",
|
|
68
|
-
"body": null,
|
|
69
|
-
"footer": null,
|
|
70
|
-
"notes": [],
|
|
71
|
-
"hash": "dd057a52e90133dfb30660b1824760cb9f10a280",
|
|
72
|
-
"gitTags": "",
|
|
73
|
-
"committerDate": "2019-02-17 21:23:35 +0000",
|
|
74
|
-
"isTagged": true,
|
|
75
|
-
"tag": "@pie-lib/plot@0.1.10"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "fix",
|
|
79
|
-
"scope": null,
|
|
80
|
-
"subject": "fix tests",
|
|
81
|
-
"merge": null,
|
|
82
|
-
"header": "fix: fix tests",
|
|
83
|
-
"body": null,
|
|
84
|
-
"footer": null,
|
|
85
|
-
"notes": [],
|
|
86
|
-
"hash": "1363aa4540f970c8cdd05ef05c1325de973d22e2",
|
|
87
|
-
"gitTags": "",
|
|
88
|
-
"committerDate": "2019-02-16 23:47:25 +0000",
|
|
89
|
-
"isTagged": true,
|
|
90
|
-
"tag": "@pie-lib/plot@0.1.10"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"type": "feat",
|
|
94
|
-
"scope": null,
|
|
95
|
-
"subject": "new package plot",
|
|
96
|
-
"merge": null,
|
|
97
|
-
"header": "feat: new package plot",
|
|
98
|
-
"body": "Contains shared components for charting/graphing",
|
|
99
|
-
"footer": null,
|
|
100
|
-
"notes": [],
|
|
101
|
-
"hash": "1adf654849a64dc86629f9a8cdec8879b711f69f",
|
|
102
|
-
"gitTags": "",
|
|
103
|
-
"committerDate": "2019-01-30 22:14:28 +0000",
|
|
104
|
-
"isTagged": true,
|
|
105
|
-
"tag": "@pie-lib/plot@0.1.0"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"type": "fix",
|
|
109
|
-
"scope": null,
|
|
110
|
-
"subject": "fix bounded drag calculation",
|
|
111
|
-
"merge": null,
|
|
112
|
-
"header": "fix: fix bounded drag calculation",
|
|
113
|
-
"body": "To get the correct x/y coordinates the drag logic needs a reference to\nthe root <g> node that contains all the elements.",
|
|
114
|
-
"footer": null,
|
|
115
|
-
"notes": [],
|
|
116
|
-
"hash": "08097bd199de32b534ea788d12f528fb5fb7b9ff",
|
|
117
|
-
"gitTags": "",
|
|
118
|
-
"committerDate": "2019-06-12 13:23:25 +0100",
|
|
119
|
-
"isTagged": true,
|
|
120
|
-
"tag": "@pie-lib/plot@0.2.0"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"type": "feat",
|
|
124
|
-
"scope": null,
|
|
125
|
-
"subject": "plot updates",
|
|
126
|
-
"merge": null,
|
|
127
|
-
"header": "feat: plot updates",
|
|
128
|
-
"body": "* trig\n* draggable refactor",
|
|
129
|
-
"footer": null,
|
|
130
|
-
"notes": [],
|
|
131
|
-
"hash": "6856d5672ac71c9d7d973c7d510bce68c2a519fc",
|
|
132
|
-
"gitTags": "",
|
|
133
|
-
"committerDate": "2019-06-10 15:24:31 +0100",
|
|
134
|
-
"isTagged": true,
|
|
135
|
-
"tag": "@pie-lib/plot@0.2.0"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"type": "fix",
|
|
139
|
-
"scope": null,
|
|
140
|
-
"subject": "fix version conflict",
|
|
141
|
-
"merge": null,
|
|
142
|
-
"header": "fix: fix version conflict",
|
|
143
|
-
"body": null,
|
|
144
|
-
"footer": null,
|
|
145
|
-
"notes": [],
|
|
146
|
-
"hash": "397b5dedd0beb34814ada7099ccdca483e696abd",
|
|
147
|
-
"gitTags": "",
|
|
148
|
-
"committerDate": "2019-06-28 14:34:18 +0100",
|
|
149
|
-
"isTagged": true,
|
|
150
|
-
"tag": "@pie-lib/plot@1.1.1"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"type": "fix",
|
|
154
|
-
"scope": null,
|
|
155
|
-
"subject": "calculate edge when points are on same horizontal or vertical line",
|
|
156
|
-
"merge": null,
|
|
157
|
-
"header": "fix: calculate edge when points are on same horizontal or vertical line",
|
|
158
|
-
"body": null,
|
|
159
|
-
"footer": null,
|
|
160
|
-
"notes": [],
|
|
161
|
-
"hash": "5cba298d99fcece210bd47ada1692144be604dc0",
|
|
162
|
-
"gitTags": "",
|
|
163
|
-
"committerDate": "2019-06-27 13:19:23 +0100",
|
|
164
|
-
"isTagged": true,
|
|
165
|
-
"tag": "@pie-lib/plot@0.2.2"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"type": "feat",
|
|
169
|
-
"scope": null,
|
|
170
|
-
"subject": "support dragging when having a grid defined by decimal values",
|
|
171
|
-
"merge": null,
|
|
172
|
-
"header": "feat: support dragging when having a grid defined by decimal values",
|
|
173
|
-
"body": null,
|
|
174
|
-
"footer": null,
|
|
175
|
-
"notes": [],
|
|
176
|
-
"hash": "5a5e505d9f1a7d3dd5bd553c03bdf61965945d68",
|
|
177
|
-
"gitTags": "",
|
|
178
|
-
"committerDate": "2019-07-16 00:42:36 +0300",
|
|
179
|
-
"isTagged": true,
|
|
180
|
-
"tag": "@pie-lib/plot@1.2.0"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"type": "feat",
|
|
184
|
-
"scope": "charting",
|
|
185
|
-
"subject": "Added Dot Plot chart type and Line Plot chart type. (WIP)",
|
|
186
|
-
"merge": null,
|
|
187
|
-
"header": "feat(charting): Added Dot Plot chart type and Line Plot chart type. (WIP)",
|
|
188
|
-
"body": null,
|
|
189
|
-
"footer": null,
|
|
190
|
-
"notes": [],
|
|
191
|
-
"hash": "b9cafc3356447b3ec55aeaedb47dbd867173e544",
|
|
192
|
-
"gitTags": "",
|
|
193
|
-
"committerDate": "2019-07-23 16:46:51 +0300",
|
|
194
|
-
"isTagged": true,
|
|
195
|
-
"tag": "@pie-lib/plot@1.3.0"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"type": "fix",
|
|
199
|
-
"scope": null,
|
|
200
|
-
"subject": "5325: Graphing: Axis labels overlapping numeric labels",
|
|
201
|
-
"merge": null,
|
|
202
|
-
"header": "fix: 5325: Graphing: Axis labels overlapping numeric labels",
|
|
203
|
-
"body": null,
|
|
204
|
-
"footer": null,
|
|
205
|
-
"notes": [],
|
|
206
|
-
"hash": "678c61ada909fdd45074b7b5e70c33d798d2dda7",
|
|
207
|
-
"gitTags": "",
|
|
208
|
-
"committerDate": "2020-02-18 10:53:28 +0200",
|
|
209
|
-
"isTagged": true,
|
|
210
|
-
"tag": "@pie-lib/plot@1.3.3"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"type": "fix",
|
|
214
|
-
"scope": null,
|
|
215
|
-
"subject": "add module prop to package.json",
|
|
216
|
-
"merge": null,
|
|
217
|
-
"header": "fix: add module prop to package.json",
|
|
218
|
-
"body": null,
|
|
219
|
-
"footer": null,
|
|
220
|
-
"notes": [],
|
|
221
|
-
"hash": "387232f7d98e5f7be458887e37cf6c1241856761",
|
|
222
|
-
"gitTags": "",
|
|
223
|
-
"committerDate": "2020-03-30 13:02:58 +0100",
|
|
224
|
-
"isTagged": true,
|
|
225
|
-
"tag": "@pie-lib/plot@1.3.5"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"type": "fix",
|
|
229
|
-
"scope": null,
|
|
230
|
-
"subject": "correct export syntax",
|
|
231
|
-
"merge": null,
|
|
232
|
-
"header": "fix: correct export syntax",
|
|
233
|
-
"body": null,
|
|
234
|
-
"footer": null,
|
|
235
|
-
"notes": [],
|
|
236
|
-
"hash": "db7fcc0fa1bddf9fc2d304978941db04001ec0ab",
|
|
237
|
-
"gitTags": "",
|
|
238
|
-
"committerDate": "2020-03-30 22:30:10 +0100",
|
|
239
|
-
"isTagged": true,
|
|
240
|
-
"tag": "@pie-lib/plot@1.3.7"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"type": "fix",
|
|
244
|
-
"scope": null,
|
|
245
|
-
"subject": "Graphing issues and inconsistencies PD-123",
|
|
246
|
-
"merge": null,
|
|
247
|
-
"header": "fix: Graphing issues and inconsistencies PD-123",
|
|
248
|
-
"body": null,
|
|
249
|
-
"footer": "BREAKING CHANGE: tools, currentTool, defaultTool and hideLabel should not be used as params anymore, instead, send only toolbarTools, which is an array of strings, where each string should be a valid tool type. eg. ['point', 'line', 'label']",
|
|
250
|
-
"notes": [
|
|
251
|
-
{
|
|
252
|
-
"title": "BREAKING CHANGE",
|
|
253
|
-
"text": "tools, currentTool, defaultTool and hideLabel should not be used as params anymore, instead, send only toolbarTools, which is an array of strings, where each string should be a valid tool type. eg. ['point', 'line', 'label']"
|
|
254
|
-
}
|
|
255
|
-
],
|
|
256
|
-
"hash": "291b0539884eaeafbd48987e595ffd267869a142",
|
|
257
|
-
"gitTags": "",
|
|
258
|
-
"committerDate": "2020-05-12 13:38:27 +0300",
|
|
259
|
-
"isTagged": true,
|
|
260
|
-
"tag": "@pie-lib/plot@2.0.0"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"type": "feat",
|
|
264
|
-
"scope": "charting",
|
|
265
|
-
"subject": "add color theme support",
|
|
266
|
-
"merge": null,
|
|
267
|
-
"header": "feat(charting): add color theme support",
|
|
268
|
-
"body": null,
|
|
269
|
-
"footer": null,
|
|
270
|
-
"notes": [],
|
|
271
|
-
"hash": "606d45e46f86cb8f56544befdb8b71fb8a451746",
|
|
272
|
-
"gitTags": "",
|
|
273
|
-
"committerDate": "2020-09-29 16:53:15 +0300",
|
|
274
|
-
"isTagged": true,
|
|
275
|
-
"tag": "@pie-lib/plot@2.1.0"
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"type": "fix",
|
|
279
|
-
"scope": "graphing",
|
|
280
|
-
"subject": "increase width and height for labels, depending on labels length PD-988",
|
|
281
|
-
"merge": null,
|
|
282
|
-
"header": "fix(graphing): increase width and height for labels, depending on labels length PD-988",
|
|
283
|
-
"body": null,
|
|
284
|
-
"footer": null,
|
|
285
|
-
"notes": [],
|
|
286
|
-
"hash": "5f64c472eedaa64882961f0da0e8aad5edefce4e",
|
|
287
|
-
"gitTags": " (origin/fix/PD-988)",
|
|
288
|
-
"committerDate": "2021-03-11 16:32:44 +0200",
|
|
289
|
-
"isTagged": true,
|
|
290
|
-
"tag": "@pie-lib/plot@2.1.4"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
"type": "fix",
|
|
294
|
-
"scope": "graphing",
|
|
295
|
-
"subject": "increase width for range axisLabel PD-988",
|
|
296
|
-
"merge": null,
|
|
297
|
-
"header": "fix(graphing): increase width for range axisLabel PD-988",
|
|
298
|
-
"body": null,
|
|
299
|
-
"footer": null,
|
|
300
|
-
"notes": [],
|
|
301
|
-
"hash": "e4e5b8f3b12931a8ad2b05590921d01d99924e9f",
|
|
302
|
-
"gitTags": "",
|
|
303
|
-
"committerDate": "2021-03-11 12:47:38 +0200",
|
|
304
|
-
"isTagged": true,
|
|
305
|
-
"tag": "@pie-lib/plot@2.1.4"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"type": "fix",
|
|
309
|
-
"scope": "graphing",
|
|
310
|
-
"subject": "calculate the amount of necessary width for domain axis label PD-988",
|
|
311
|
-
"merge": null,
|
|
312
|
-
"header": "fix(graphing): calculate the amount of necessary width for domain axis label PD-988",
|
|
313
|
-
"body": null,
|
|
314
|
-
"footer": null,
|
|
315
|
-
"notes": [],
|
|
316
|
-
"hash": "0085feb879b6246a887de4ec025d0c1149c297b6",
|
|
317
|
-
"gitTags": "",
|
|
318
|
-
"committerDate": "2021-03-11 11:36:29 +0200",
|
|
319
|
-
"isTagged": true,
|
|
320
|
-
"tag": "@pie-lib/plot@2.1.4"
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
"type": "fix",
|
|
324
|
-
"scope": "graphing",
|
|
325
|
-
"subject": "Modified labels size and bug fixes",
|
|
326
|
-
"merge": null,
|
|
327
|
-
"header": "fix(graphing): Modified labels size and bug fixes",
|
|
328
|
-
"body": null,
|
|
329
|
-
"footer": null,
|
|
330
|
-
"notes": [],
|
|
331
|
-
"hash": "e6dd79a235728d21bfdd2ecdf0b4aed610b1291d",
|
|
332
|
-
"gitTags": "",
|
|
333
|
-
"committerDate": "2021-03-26 12:18:14 +0200",
|
|
334
|
-
"isTagged": true,
|
|
335
|
-
"tag": "@pie-lib/plot@2.1.5"
|
|
336
|
-
},
|
|
337
2
|
{
|
|
338
3
|
"type": "fix",
|
|
339
4
|
"scope": "charting",
|
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,151 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [2.10.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.10.0) (2025-07-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.9.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.9.0) (2025-07-31)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [2.8.0-beta.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.8) (2025-07-25)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [2.8.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.7) (2025-07-25)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [2.8.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.7) (2025-07-25)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# [2.8.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.6) (2025-07-25)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# [2.8.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.6) (2025-07-25)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# [2.8.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.5) (2025-07-25)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# [2.8.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.5) (2025-07-25)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# [2.8.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.4) (2025-07-25)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# [2.8.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.3) (2025-07-25)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
# [2.8.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.4) (2025-07-23)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# [2.8.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.3) (2025-07-23)
|
|
103
|
+
|
|
104
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# [2.8.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.3) (2025-07-20)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# [2.8.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.2) (2025-07-20)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
# [2.8.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.1) (2025-07-20)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
# [2.8.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.2) (2025-07-20)
|
|
135
|
+
|
|
136
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
# [2.8.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.1) (2025-07-20)
|
|
143
|
+
|
|
144
|
+
**Note:** Version bump only for package @pie-lib/plot
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
# [2.8.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.7.3...@pie-lib/plot@2.8.0-beta.1) (2025-07-20)
|
|
7
151
|
|
|
8
152
|
**Note:** Version bump only for package @pie-lib/plot
|
|
9
153
|
|
package/lib/draggable.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(exports, "DraggableCore", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _reactDraggable.DraggableCore;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
exports["default"] = void 0;
|
|
17
|
+
|
|
18
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
19
|
+
|
|
20
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
21
|
+
|
|
22
|
+
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
23
|
+
|
|
24
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
25
|
+
|
|
26
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
27
|
+
|
|
28
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
29
|
+
|
|
30
|
+
var _reactDraggable = _interopRequireWildcard(require("react-draggable"));
|
|
31
|
+
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
36
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
37
|
+
|
|
38
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
+
|
|
40
|
+
var LocalDraggable = /*#__PURE__*/function (_Draggable) {
|
|
41
|
+
(0, _inherits2["default"])(LocalDraggable, _Draggable);
|
|
42
|
+
|
|
43
|
+
var _super = _createSuper(LocalDraggable);
|
|
44
|
+
|
|
45
|
+
function LocalDraggable() {
|
|
46
|
+
(0, _classCallCheck2["default"])(this, LocalDraggable);
|
|
47
|
+
return _super.apply(this, arguments);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
(0, _createClass2["default"])(LocalDraggable, [{
|
|
51
|
+
key: "componentWillReceiveProps",
|
|
52
|
+
value: function componentWillReceiveProps(next) {
|
|
53
|
+
(0, _get2["default"])((0, _getPrototypeOf2["default"])(LocalDraggable.prototype), "componentWillReceiveProps", this).call(this, next); //Remove the x/y state as these values have now been updated and will come through as props.
|
|
54
|
+
|
|
55
|
+
this.setState({
|
|
56
|
+
x: 0,
|
|
57
|
+
y: 0
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
return LocalDraggable;
|
|
62
|
+
}(_reactDraggable["default"]);
|
|
63
|
+
|
|
64
|
+
exports["default"] = LocalDraggable;
|
|
65
|
+
//# sourceMappingURL=draggable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/draggable.jsx"],"names":["LocalDraggable","next","setState","x","y","Draggable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;IAEqBA,c;;;;;;;;;;;;WACnB,mCAA0BC,IAA1B,EAAgC;AAC9B,sIAAgCA,IAAhC,EAD8B,CAE9B;;AACA,WAAKC,QAAL,CAAc;AAAEC,QAAAA,CAAC,EAAE,CAAL;AAAQC,QAAAA,CAAC,EAAE;AAAX,OAAd;AACD;;;EALyCC,0B","sourcesContent":["import Draggable, { DraggableCore } from 'react-draggable';\n\nexport default class LocalDraggable extends Draggable {\n componentWillReceiveProps(next) {\n super.componentWillReceiveProps(next);\n //Remove the x/y state as these values have now been updated and will come through as props.\n this.setState({ x: 0, y: 0 });\n }\n}\n\nexport { DraggableCore };\n"],"file":"draggable.js"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.create = void 0;
|
|
9
|
+
|
|
10
|
+
var _invariant = _interopRequireDefault(require("invariant"));
|
|
11
|
+
|
|
12
|
+
var _utils = require("./utils");
|
|
13
|
+
|
|
14
|
+
var _d3Scale = require("d3-scale");
|
|
15
|
+
|
|
16
|
+
var createSnapMinAndMax = function createSnapMinAndMax(_ref) {
|
|
17
|
+
var min = _ref.min,
|
|
18
|
+
max = _ref.max,
|
|
19
|
+
step = _ref.step;
|
|
20
|
+
// for graphing, if step is a value with decimals, we have to calculate the min & max for the grid taking in consideration that 0 has to be exactly in the middle
|
|
21
|
+
// for example, if min: -5 & max: 5 & step: 0.75, in order to keep 0 in the middle we have to set min: -4.5 & max: 4.5
|
|
22
|
+
return {
|
|
23
|
+
step: step,
|
|
24
|
+
min: parseInt(min / step) * step,
|
|
25
|
+
max: parseInt(max / step) * step
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var create = function create(domain, range, size, getRootNode) {
|
|
30
|
+
(0, _invariant["default"])(domain.min < domain.max, 'domain: min must be less than max');
|
|
31
|
+
(0, _invariant["default"])(range.min < range.max, 'range: min must be less than max');
|
|
32
|
+
var domainMinMax = createSnapMinAndMax(domain);
|
|
33
|
+
var rangeMinMax = createSnapMinAndMax(range);
|
|
34
|
+
var scale = {
|
|
35
|
+
x: (0, _d3Scale.scaleLinear)().domain([domain.min, domain.max]).range([0, size.width]),
|
|
36
|
+
y: (0, _d3Scale.scaleLinear)().domain([range.max, range.min]).range([0, size.height])
|
|
37
|
+
};
|
|
38
|
+
var snap = {
|
|
39
|
+
x: _utils.snapTo.bind(null, domainMinMax.min, domainMinMax.max, domainMinMax.step),
|
|
40
|
+
y: _utils.snapTo.bind(null, rangeMinMax.min, rangeMinMax.max, rangeMinMax.step)
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
scale: scale,
|
|
44
|
+
snap: snap,
|
|
45
|
+
domain: domain,
|
|
46
|
+
range: range,
|
|
47
|
+
size: size,
|
|
48
|
+
getRootNode: getRootNode
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.create = create;
|
|
53
|
+
//# sourceMappingURL=graph-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/graph-props.js"],"names":["createSnapMinAndMax","min","max","step","parseInt","create","domain","range","size","getRootNode","domainMinMax","rangeMinMax","scale","x","width","y","height","snap","snapTo","bind"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,OAAwB;AAAA,MAArBC,GAAqB,QAArBA,GAAqB;AAAA,MAAhBC,GAAgB,QAAhBA,GAAgB;AAAA,MAAXC,IAAW,QAAXA,IAAW;AAClD;AACA;AAEA,SAAO;AACLA,IAAAA,IAAI,EAAJA,IADK;AAELF,IAAAA,GAAG,EAAEG,QAAQ,CAACH,GAAG,GAAGE,IAAP,CAAR,GAAuBA,IAFvB;AAGLD,IAAAA,GAAG,EAAEE,QAAQ,CAACF,GAAG,GAAGC,IAAP,CAAR,GAAuBA;AAHvB,GAAP;AAKD,CATD;;AAWO,IAAME,MAAM,GAAG,SAATA,MAAS,CAACC,MAAD,EAASC,KAAT,EAAgBC,IAAhB,EAAsBC,WAAtB,EAAsC;AAC1D,6BAAUH,MAAM,CAACL,GAAP,GAAaK,MAAM,CAACJ,GAA9B,EAAmC,mCAAnC;AACA,6BAAUK,KAAK,CAACN,GAAN,GAAYM,KAAK,CAACL,GAA5B,EAAiC,kCAAjC;AAEA,MAAMQ,YAAY,GAAGV,mBAAmB,CAACM,MAAD,CAAxC;AACA,MAAMK,WAAW,GAAGX,mBAAmB,CAACO,KAAD,CAAvC;AAEA,MAAMK,KAAK,GAAG;AACZC,IAAAA,CAAC,EAAE,4BACAP,MADA,CACO,CAACA,MAAM,CAACL,GAAR,EAAaK,MAAM,CAACJ,GAApB,CADP,EAEAK,KAFA,CAEM,CAAC,CAAD,EAAIC,IAAI,CAACM,KAAT,CAFN,CADS;AAIZC,IAAAA,CAAC,EAAE,4BACAT,MADA,CACO,CAACC,KAAK,CAACL,GAAP,EAAYK,KAAK,CAACN,GAAlB,CADP,EAEAM,KAFA,CAEM,CAAC,CAAD,EAAIC,IAAI,CAACQ,MAAT,CAFN;AAJS,GAAd;AASA,MAAMC,IAAI,GAAG;AACXJ,IAAAA,CAAC,EAAEK,cAAOC,IAAP,CAAY,IAAZ,EAAkBT,YAAY,CAACT,GAA/B,EAAoCS,YAAY,CAACR,GAAjD,EAAsDQ,YAAY,CAACP,IAAnE,CADQ;AAEXY,IAAAA,CAAC,EAAEG,cAAOC,IAAP,CAAY,IAAZ,EAAkBR,WAAW,CAACV,GAA9B,EAAmCU,WAAW,CAACT,GAA/C,EAAoDS,WAAW,CAACR,IAAhE;AAFQ,GAAb;AAKA,SAAO;AAAES,IAAAA,KAAK,EAALA,KAAF;AAASK,IAAAA,IAAI,EAAJA,IAAT;AAAeX,IAAAA,MAAM,EAANA,MAAf;AAAuBC,IAAAA,KAAK,EAALA,KAAvB;AAA8BC,IAAAA,IAAI,EAAJA,IAA9B;AAAoCC,IAAAA,WAAW,EAAXA;AAApC,GAAP;AACD,CAtBM","sourcesContent":["import invariant from 'invariant';\nimport { snapTo } from './utils';\nimport { scaleLinear } from 'd3-scale';\n\nconst createSnapMinAndMax = ({ min, max, step }) => {\n // for graphing, if step is a value with decimals, we have to calculate the min & max for the grid taking in consideration that 0 has to be exactly in the middle\n // for example, if min: -5 & max: 5 & step: 0.75, in order to keep 0 in the middle we have to set min: -4.5 & max: 4.5\n\n return {\n step,\n min: parseInt(min / step) * step,\n max: parseInt(max / step) * step,\n };\n};\n\nexport const create = (domain, range, size, getRootNode) => {\n invariant(domain.min < domain.max, 'domain: min must be less than max');\n invariant(range.min < range.max, 'range: min must be less than max');\n\n const domainMinMax = createSnapMinAndMax(domain);\n const rangeMinMax = createSnapMinAndMax(range);\n\n const scale = {\n x: scaleLinear()\n .domain([domain.min, domain.max])\n .range([0, size.width]),\n y: scaleLinear()\n .domain([range.max, range.min])\n .range([0, size.height]),\n };\n\n const snap = {\n x: snapTo.bind(null, domainMinMax.min, domainMinMax.max, domainMinMax.step),\n y: snapTo.bind(null, rangeMinMax.min, rangeMinMax.max, rangeMinMax.step),\n };\n\n return { scale, snap, domain, range, size, getRootNode };\n};\n"],"file":"graph-props.js"}
|