@pie-lib/graphing 2.14.2-next.0 → 2.14.2

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.md CHANGED
@@ -3,7 +3,7 @@
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
- ## [2.14.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.0...@pie-lib/graphing@2.14.1) (2023-06-12)
6
+ ## [2.14.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.1...@pie-lib/graphing@2.14.2) (2023-06-13)
7
7
 
8
8
  **Note:** Version bump only for package @pie-lib/graphing
9
9
 
@@ -11,731 +11,404 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- # [2.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.4...@pie-lib/graphing@2.14.0) (2023-06-12)
15
-
16
-
17
- ### Features
18
-
19
- * started adding new mathMLOptions property PD-2150 ([175b45e](https://github.com/pie-framework/pie-lib/commit/175b45ecd98e9cc703bd7056b930f299a4345c75))
14
+ ## [2.14.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.14.0...@pie-lib/graphing@2.14.1) (2023-06-12)
20
15
 
16
+ **Note:** Version bump only for package @pie-lib/graphing
21
17
 
18
+ # [2.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.4...@pie-lib/graphing@2.14.0) (2023-06-12)
22
19
 
20
+ ### Features
23
21
 
22
+ - started adding new mathMLOptions property PD-2150 ([175b45e](https://github.com/pie-framework/pie-lib/commit/175b45ecd98e9cc703bd7056b930f299a4345c75))
24
23
 
25
24
  ## [2.13.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.3...@pie-lib/graphing@2.13.4) (2023-06-12)
26
25
 
27
26
  **Note:** Version bump only for package @pie-lib/graphing
28
27
 
29
-
30
-
31
-
32
-
33
28
  ## [2.13.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.2...@pie-lib/graphing@2.13.3) (2023-06-07)
34
29
 
35
-
36
30
  ### Bug Fixes
37
31
 
38
- * prettier ([7ab7f22](https://github.com/pie-framework/pie-lib/commit/7ab7f22ac1cd0e5511036421d832ea2fbe5dd4f6))
39
- * switching tool not working because it was using the button's text content, which doesn't work with translations ([0006efb](https://github.com/pie-framework/pie-lib/commit/0006efb12632b016d01ee327cc36a45b91cfff4b))
40
-
41
-
42
-
43
-
32
+ - prettier ([7ab7f22](https://github.com/pie-framework/pie-lib/commit/7ab7f22ac1cd0e5511036421d832ea2fbe5dd4f6))
33
+ - switching tool not working because it was using the button's text content, which doesn't work with translations ([0006efb](https://github.com/pie-framework/pie-lib/commit/0006efb12632b016d01ee327cc36a45b91cfff4b))
44
34
 
45
35
  ## [2.13.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.1...@pie-lib/graphing@2.13.2) (2023-06-06)
46
36
 
47
-
48
37
  ### Bug Fixes
49
38
 
50
- * update graphing's usage of translator after breaking changes in the translator package ([d3081d2](https://github.com/pie-framework/pie-lib/commit/d3081d2fc6e27f3579d52e2fe5a7361aaf4b7b39))
51
-
52
-
53
-
54
-
39
+ - update graphing's usage of translator after breaking changes in the translator package ([d3081d2](https://github.com/pie-framework/pie-lib/commit/d3081d2fc6e27f3579d52e2fe5a7361aaf4b7b39))
55
40
 
56
41
  ## [2.13.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.13.0...@pie-lib/graphing@2.13.1) (2023-06-06)
57
42
 
58
43
  **Note:** Version bump only for package @pie-lib/graphing
59
44
 
60
-
61
-
62
-
63
-
64
45
  # [2.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.30...@pie-lib/graphing@2.13.0) (2023-06-06)
65
46
 
66
-
67
47
  ### Features
68
48
 
69
- * added translator package for graphing PD-1208 ([99d1ad7](https://github.com/pie-framework/pie-lib/commit/99d1ad796707d2d613c4776df7d06e94c33fe07c))
70
-
71
-
72
-
73
-
49
+ - added translator package for graphing PD-1208 ([99d1ad7](https://github.com/pie-framework/pie-lib/commit/99d1ad796707d2d613c4776df7d06e94c33fe07c))
74
50
 
75
51
  ## [2.12.30](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.29...@pie-lib/graphing@2.12.30) (2023-06-05)
76
52
 
77
53
  **Note:** Version bump only for package @pie-lib/graphing
78
54
 
79
-
80
-
81
-
82
-
83
55
  ## [2.12.29](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.28...@pie-lib/graphing@2.12.29) (2023-05-18)
84
56
 
85
-
86
57
  ### Bug Fixes
87
58
 
88
- * **graphing:** undo-redo issues ([38d5d2b](https://github.com/pie-framework/pie-lib/commit/38d5d2b4d2098d80b2d288874e0a8050be65caf4))
89
-
90
-
91
-
92
-
59
+ - **graphing:** undo-redo issues ([38d5d2b](https://github.com/pie-framework/pie-lib/commit/38d5d2b4d2098d80b2d288874e0a8050be65caf4))
93
60
 
94
61
  ## [2.12.28](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.27...@pie-lib/graphing@2.12.28) (2023-05-12)
95
62
 
96
-
97
63
  ### Bug Fixes
98
64
 
99
- * **graphing:** add new style for missing objects - PD-1026 ([4dba6c2](https://github.com/pie-framework/pie-lib/commit/4dba6c2dcafbf9f250f1379672cba63e5c805b10))
100
- * **graphing:** update snapshot ([b237367](https://github.com/pie-framework/pie-lib/commit/b237367cac6cef2af22217b9f5b07dfa0f3291a0))
101
-
102
-
103
-
104
-
65
+ - **graphing:** add new style for missing objects - PD-1026 ([4dba6c2](https://github.com/pie-framework/pie-lib/commit/4dba6c2dcafbf9f250f1379672cba63e5c805b10))
66
+ - **graphing:** update snapshot ([b237367](https://github.com/pie-framework/pie-lib/commit/b237367cac6cef2af22217b9f5b07dfa0f3291a0))
105
67
 
106
68
  ## [2.12.27](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.26...@pie-lib/graphing@2.12.27) (2023-05-01)
107
69
 
108
-
109
70
  ### Bug Fixes
110
71
 
111
- * **graphing:** remove shouldComponentUpdate from polygon PD-2753 ([f90524f](https://github.com/pie-framework/pie-lib/commit/f90524f96c868393ce445b8daaa833f85ae17c50))
112
-
113
-
114
-
115
-
72
+ - **graphing:** remove shouldComponentUpdate from polygon PD-2753 ([f90524f](https://github.com/pie-framework/pie-lib/commit/f90524f96c868393ce445b8daaa833f85ae17c50))
116
73
 
117
74
  ## [2.12.26](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.25...@pie-lib/graphing@2.12.26) (2023-04-25)
118
75
 
119
-
120
76
  ### Bug Fixes
121
77
 
122
- * **graphing:** revert lint fix ([06de9cb](https://github.com/pie-framework/pie-lib/commit/06de9cb8e461cec90996de64cc9e79e2ab80882c))
123
-
124
-
125
-
126
-
78
+ - **graphing:** revert lint fix ([06de9cb](https://github.com/pie-framework/pie-lib/commit/06de9cb8e461cec90996de64cc9e79e2ab80882c))
127
79
 
128
80
  ## [2.12.25](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.24...@pie-lib/graphing@2.12.25) (2023-04-25)
129
81
 
130
82
  **Note:** Version bump only for package @pie-lib/graphing
131
83
 
132
-
133
-
134
-
135
-
136
84
  ## [2.12.24](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.23...@pie-lib/graphing@2.12.24) (2023-04-19)
137
85
 
138
-
139
86
  ### Bug Fixes
140
87
 
141
- * **eslint:** fix eslint problems-PD-2732 ([9eb9976](https://github.com/pie-framework/pie-lib/commit/9eb9976749753da86e1057a07bd2cfc65bf64ae4))
142
-
143
-
144
-
145
-
88
+ - **eslint:** fix eslint problems-PD-2732 ([9eb9976](https://github.com/pie-framework/pie-lib/commit/9eb9976749753da86e1057a07bd2cfc65bf64ae4))
146
89
 
147
90
  ## [2.12.23](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.22...@pie-lib/graphing@2.12.23) (2023-04-14)
148
91
 
149
92
  **Note:** Version bump only for package @pie-lib/graphing
150
93
 
151
-
152
-
153
-
154
-
155
94
  ## [2.12.22](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.21...@pie-lib/graphing@2.12.22) (2023-04-14)
156
95
 
157
96
  **Note:** Version bump only for package @pie-lib/graphing
158
97
 
159
-
160
-
161
-
162
-
163
98
  ## [2.12.21](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.20...@pie-lib/graphing@2.12.21) (2023-04-07)
164
99
 
165
100
  **Note:** Version bump only for package @pie-lib/graphing
166
101
 
167
-
168
-
169
-
170
-
171
102
  ## [2.12.20](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.19...@pie-lib/graphing@2.12.20) (2023-04-03)
172
103
 
173
104
  **Note:** Version bump only for package @pie-lib/graphing
174
105
 
175
-
176
-
177
-
178
-
179
106
  ## [2.12.19](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.18...@pie-lib/graphing@2.12.19) (2023-03-27)
180
107
 
181
-
182
108
  ### Bug Fixes
183
109
 
184
- * **graphing:** create method to generate randomId and updated tests-PD-2670 ([3e0790a](https://github.com/pie-framework/pie-lib/commit/3e0790ad3f233248fac0cfff5ba10f298cd339cb))
185
-
186
-
187
-
188
-
110
+ - **graphing:** create method to generate randomId and updated tests-PD-2670 ([3e0790a](https://github.com/pie-framework/pie-lib/commit/3e0790ad3f233248fac0cfff5ba10f298cd339cb))
189
111
 
190
112
  ## [2.12.18](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.17...@pie-lib/graphing@2.12.18) (2023-03-20)
191
113
 
192
-
193
114
  ### Bug Fixes
194
115
 
195
- * **graphing:** avoid components to have same id - PD-2670 ([94fdaaa](https://github.com/pie-framework/pie-lib/commit/94fdaaaec65530e3217de0e4e3e98a9ef9bcd47f))
196
-
197
-
198
-
199
-
116
+ - **graphing:** avoid components to have same id - PD-2670 ([94fdaaa](https://github.com/pie-framework/pie-lib/commit/94fdaaaec65530e3217de0e4e3e98a9ef9bcd47f))
200
117
 
201
118
  ## [2.12.17](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.16...@pie-lib/graphing@2.12.17) (2023-03-13)
202
119
 
203
-
204
120
  ### Bug Fixes
205
121
 
206
- * **graphing:** fix arrow heads PD-2653 ([4d4e625](https://github.com/pie-framework/pie-lib/commit/4d4e6255e3e874d90813e0bb787180fd3e8e6091))
207
- * **graphing:** set diff between min and max to 0.05: PD-2673 ([e8862b6](https://github.com/pie-framework/pie-lib/commit/e8862b6f2f41fbfe431630b386ba999a3095cb0a))
208
-
209
-
210
-
211
-
122
+ - **graphing:** fix arrow heads PD-2653 ([4d4e625](https://github.com/pie-framework/pie-lib/commit/4d4e6255e3e874d90813e0bb787180fd3e8e6091))
123
+ - **graphing:** set diff between min and max to 0.05: PD-2673 ([e8862b6](https://github.com/pie-framework/pie-lib/commit/e8862b6f2f41fbfe431630b386ba999a3095cb0a))
212
124
 
213
125
  ## [2.12.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.15...@pie-lib/graphing@2.12.16) (2023-03-06)
214
126
 
215
-
216
127
  ### Bug Fixes
217
128
 
218
- * **graphing:** fix undo and redo not working in gather PD-2677 ([5e4eea3](https://github.com/pie-framework/pie-lib/commit/5e4eea3173244ce0fc99cf8aa468fe34d5950090))
219
- * **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([ee37a40](https://github.com/pie-framework/pie-lib/commit/ee37a405d52cfc7db1368c84ca7ccd611c67aca5))
220
- * **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([7768cb2](https://github.com/pie-framework/pie-lib/commit/7768cb2cd76d14334ab3f5f7705408e94aa6145e))
221
-
222
-
223
-
224
-
129
+ - **graphing:** fix undo and redo not working in gather PD-2677 ([5e4eea3](https://github.com/pie-framework/pie-lib/commit/5e4eea3173244ce0fc99cf8aa468fe34d5950090))
130
+ - **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([ee37a40](https://github.com/pie-framework/pie-lib/commit/ee37a405d52cfc7db1368c84ca7ccd611c67aca5))
131
+ - **graphing:** replaced horizontal and vertical lines values between them PD-2674 ([7768cb2](https://github.com/pie-framework/pie-lib/commit/7768cb2cd76d14334ab3f5f7705408e94aa6145e))
225
132
 
226
133
  ## [2.12.15](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.13...@pie-lib/graphing@2.12.15) (2023-02-28)
227
134
 
228
-
229
135
  ### Bug Fixes
230
136
 
231
- * version bump ([d9280a9](https://github.com/pie-framework/pie-lib/commit/d9280a9aeddab459b6d84ecdbeb62814e1eee965))
232
-
233
-
234
-
235
-
137
+ - version bump ([d9280a9](https://github.com/pie-framework/pie-lib/commit/d9280a9aeddab459b6d84ecdbeb62814e1eee965))
236
138
 
237
139
  ## [2.12.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.12...@pie-lib/graphing@2.12.13) (2023-02-28)
238
140
 
239
141
  **Note:** Version bump only for package @pie-lib/graphing
240
142
 
241
-
242
-
243
-
244
-
245
143
  ## [2.12.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.10...@pie-lib/graphing@2.12.12) (2023-01-31)
246
144
 
247
145
  **Note:** Version bump only for package @pie-lib/graphing
248
146
 
249
-
250
-
251
-
252
-
253
147
  ## [2.12.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.9...@pie-lib/graphing@2.12.10) (2023-01-31)
254
148
 
255
149
  **Note:** Version bump only for package @pie-lib/graphing
256
150
 
257
-
258
-
259
-
260
-
261
151
  ## [2.12.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.8...@pie-lib/graphing@2.12.9) (2023-01-31)
262
152
 
263
153
  **Note:** Version bump only for package @pie-lib/graphing
264
154
 
265
-
266
-
267
-
268
-
269
155
  ## [2.12.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.7...@pie-lib/graphing@2.12.8) (2023-01-31)
270
156
 
271
157
  **Note:** Version bump only for package @pie-lib/graphing
272
158
 
273
-
274
-
275
-
276
-
277
159
  ## [2.12.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.5...@pie-lib/graphing@2.12.7) (2023-01-31)
278
160
 
279
161
  **Note:** Version bump only for package @pie-lib/graphing
280
162
 
281
-
282
-
283
-
284
-
285
163
  ## [2.12.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.3...@pie-lib/graphing@2.12.5) (2023-01-31)
286
164
 
287
165
  **Note:** Version bump only for package @pie-lib/graphing
288
166
 
289
-
290
-
291
-
292
-
293
167
  ## [2.12.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.1...@pie-lib/graphing@2.12.3) (2023-01-31)
294
168
 
295
169
  **Note:** Version bump only for package @pie-lib/graphing
296
170
 
297
-
298
-
299
-
300
-
301
171
  ## [2.12.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.12.0...@pie-lib/graphing@2.12.1) (2023-01-31)
302
172
 
303
173
  **Note:** Version bump only for package @pie-lib/graphing
304
174
 
305
-
306
-
307
-
308
-
309
175
  # [2.12.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.9...@pie-lib/graphing@2.12.0) (2023-01-16)
310
176
 
311
-
312
177
  ### Bug Fixes
313
178
 
314
- * **graphing:** add background for objects labels PD-2061 ([f27ba7a](https://github.com/pie-framework/pie-lib/commit/f27ba7a1f8f476f9b9806505d1b3271057793921))
315
- * **graphing:** fix calculation for mark-label coordinates, fix and update tests ([84bedd2](https://github.com/pie-framework/pie-lib/commit/84bedd2139cd2b5578b951ccb32f4f29917ff6e1))
316
- * **graphing:** fix calculation for mark-label coordinates, fix and update tests ([a83213d](https://github.com/pie-framework/pie-lib/commit/a83213d26d28ca41c2e9575f619adb8006b4e5ee))
317
- * **graphing:** fix calculation for mark-label coordinates, fix and update tests ([09c1445](https://github.com/pie-framework/pie-lib/commit/09c1445e7b60a2ad10120a78e3f54acdfc162cbe))
318
- * **graphing:** fix mark labels position for touch devices ([12a2362](https://github.com/pie-framework/pie-lib/commit/12a2362f013b677ef912a75f212e68af1399af5e))
319
- * **graphing:** fix style for points, refactor ([5d5893b](https://github.com/pie-framework/pie-lib/commit/5d5893bbb993081b79ad712ed362d350574853ed))
320
- * **graphing:** make the base point tappable on touch devices ([d633d64](https://github.com/pie-framework/pie-lib/commit/d633d64ec1b5dde39513d49b6697f3bc12d0d994))
321
- * **graphing:** make the label tool responsive wip ([0694f9c](https://github.com/pie-framework/pie-lib/commit/0694f9c2816c58f16c52c4deeba04da2d55d3a54))
322
- * **graphing:** try to make the point tappable on touch devices ([7cfb116](https://github.com/pie-framework/pie-lib/commit/7cfb1165496b60b392c90585038f2d3f30c5e261))
323
-
179
+ - **graphing:** add background for objects labels PD-2061 ([f27ba7a](https://github.com/pie-framework/pie-lib/commit/f27ba7a1f8f476f9b9806505d1b3271057793921))
180
+ - **graphing:** fix calculation for mark-label coordinates, fix and update tests ([84bedd2](https://github.com/pie-framework/pie-lib/commit/84bedd2139cd2b5578b951ccb32f4f29917ff6e1))
181
+ - **graphing:** fix calculation for mark-label coordinates, fix and update tests ([a83213d](https://github.com/pie-framework/pie-lib/commit/a83213d26d28ca41c2e9575f619adb8006b4e5ee))
182
+ - **graphing:** fix calculation for mark-label coordinates, fix and update tests ([09c1445](https://github.com/pie-framework/pie-lib/commit/09c1445e7b60a2ad10120a78e3f54acdfc162cbe))
183
+ - **graphing:** fix mark labels position for touch devices ([12a2362](https://github.com/pie-framework/pie-lib/commit/12a2362f013b677ef912a75f212e68af1399af5e))
184
+ - **graphing:** fix style for points, refactor ([5d5893b](https://github.com/pie-framework/pie-lib/commit/5d5893bbb993081b79ad712ed362d350574853ed))
185
+ - **graphing:** make the base point tappable on touch devices ([d633d64](https://github.com/pie-framework/pie-lib/commit/d633d64ec1b5dde39513d49b6697f3bc12d0d994))
186
+ - **graphing:** make the label tool responsive wip ([0694f9c](https://github.com/pie-framework/pie-lib/commit/0694f9c2816c58f16c52c4deeba04da2d55d3a54))
187
+ - **graphing:** try to make the point tappable on touch devices ([7cfb116](https://github.com/pie-framework/pie-lib/commit/7cfb1165496b60b392c90585038f2d3f30c5e261))
324
188
 
325
189
  ### Features
326
190
 
327
- * added theme naming support + cleanup ([72d562d](https://github.com/pie-framework/pie-lib/commit/72d562d509e5d31d883690eb455a9afea6bf54fc))
328
-
329
-
330
-
331
-
191
+ - added theme naming support + cleanup ([72d562d](https://github.com/pie-framework/pie-lib/commit/72d562d509e5d31d883690eb455a9afea6bf54fc))
332
192
 
333
193
  ## [2.11.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.8...@pie-lib/graphing@2.11.9) (2023-01-04)
334
194
 
335
195
  **Note:** Version bump only for package @pie-lib/graphing
336
196
 
337
-
338
-
339
-
340
-
341
197
  ## [2.11.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.7...@pie-lib/graphing@2.11.8) (2023-01-03)
342
198
 
343
199
  **Note:** Version bump only for package @pie-lib/graphing
344
200
 
345
-
346
-
347
-
348
-
349
201
  ## [2.11.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.6...@pie-lib/graphing@2.11.7) (2022-12-19)
350
202
 
351
-
352
203
  ### Bug Fixes
353
204
 
354
- * **garphing:** update model when polygon labels have changed PD-993 ([cb8e0a7](https://github.com/pie-framework/pie-lib/commit/cb8e0a75533a3944d81984d0775b3b79134265f2))
355
- * **graphing:** adjust clickable area for plotable shapes PD-1958 ([6396096](https://github.com/pie-framework/pie-lib/commit/63960962aea5db5fa6584e464e5478972db7feb8))
356
- * **graphing:** update graph store if marks are changed ([90d7176](https://github.com/pie-framework/pie-lib/commit/90d717675abc32788086edd02fcd96706b5a50f6))
357
-
358
-
359
-
360
-
205
+ - **garphing:** update model when polygon labels have changed PD-993 ([cb8e0a7](https://github.com/pie-framework/pie-lib/commit/cb8e0a75533a3944d81984d0775b3b79134265f2))
206
+ - **graphing:** adjust clickable area for plotable shapes PD-1958 ([6396096](https://github.com/pie-framework/pie-lib/commit/63960962aea5db5fa6584e464e5478972db7feb8))
207
+ - **graphing:** update graph store if marks are changed ([90d7176](https://github.com/pie-framework/pie-lib/commit/90d717675abc32788086edd02fcd96706b5a50f6))
361
208
 
362
209
  ## [2.11.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.5...@pie-lib/graphing@2.11.6) (2022-12-06)
363
210
 
364
211
  **Note:** Version bump only for package @pie-lib/graphing
365
212
 
366
-
367
-
368
-
369
-
370
213
  ## [2.11.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.4...@pie-lib/graphing@2.11.5) (2022-11-29)
371
214
 
372
215
  **Note:** Version bump only for package @pie-lib/graphing
373
216
 
374
-
375
-
376
-
377
-
378
217
  ## [2.11.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.3...@pie-lib/graphing@2.11.4) (2022-11-23)
379
218
 
380
219
  **Note:** Version bump only for package @pie-lib/graphing
381
220
 
382
-
383
-
384
-
385
-
386
221
  ## [2.11.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.2...@pie-lib/graphing@2.11.3) (2022-11-23)
387
222
 
388
223
  **Note:** Version bump only for package @pie-lib/graphing
389
224
 
390
-
391
-
392
-
393
-
394
225
  ## [2.11.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.1...@pie-lib/graphing@2.11.2) (2022-10-17)
395
226
 
396
-
397
227
  ### Bug Fixes
398
228
 
399
- * **graphing:** increase draggable zone for graphing base point for better interaction with touchscreen devices ([50fc498](https://github.com/pie-framework/pie-lib/commit/50fc49825c14bf2248e773b4cbaecb309a4fb814))
400
-
401
-
402
-
403
-
229
+ - **graphing:** increase draggable zone for graphing base point for better interaction with touchscreen devices ([50fc498](https://github.com/pie-framework/pie-lib/commit/50fc49825c14bf2248e773b4cbaecb309a4fb814))
404
230
 
405
231
  ## [2.11.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.11.0...@pie-lib/graphing@2.11.1) (2022-09-29)
406
232
 
407
233
  **Note:** Version bump only for package @pie-lib/graphing
408
234
 
409
-
410
-
411
-
412
-
413
235
  # [2.11.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.3...@pie-lib/graphing@2.11.0) (2022-09-28)
414
236
 
415
-
416
237
  ### Bug Fixes
417
238
 
418
- * **editable-html, graphing:** Add support to remove scrollbar from editable-html and removed scrollbar from graphing labels PD-1968 ([d04a0d3](https://github.com/pie-framework/pie-lib/commit/d04a0d3bc66d4b861f60b24198301459c15bd151))
419
-
239
+ - **editable-html, graphing:** Add support to remove scrollbar from editable-html and removed scrollbar from graphing labels PD-1968 ([d04a0d3](https://github.com/pie-framework/pie-lib/commit/d04a0d3bc66d4b861f60b24198301459c15bd151))
420
240
 
421
241
  ### Features
422
242
 
423
- * **graphing, plot:** moved graphing labels to plot package + fixed math input + added support for labels rotation PD-1962 ([a85ec39](https://github.com/pie-framework/pie-lib/commit/a85ec3911dd1f6bc89e4eb20a19ef8f957deebf1))
424
-
425
-
426
-
427
-
243
+ - **graphing, plot:** moved graphing labels to plot package + fixed math input + added support for labels rotation PD-1962 ([a85ec39](https://github.com/pie-framework/pie-lib/commit/a85ec3911dd1f6bc89e4eb20a19ef8f957deebf1))
428
244
 
429
245
  ## [2.10.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.2...@pie-lib/graphing@2.10.3) (2022-09-14)
430
246
 
431
247
  **Note:** Version bump only for package @pie-lib/graphing
432
248
 
433
-
434
-
435
-
436
-
437
249
  ## [2.10.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.1...@pie-lib/graphing@2.10.2) (2022-08-30)
438
250
 
439
251
  **Note:** Version bump only for package @pie-lib/graphing
440
252
 
441
-
442
-
443
-
444
-
445
253
  ## [2.10.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.10.0...@pie-lib/graphing@2.10.1) (2022-08-29)
446
254
 
447
-
448
255
  ### Bug Fixes
449
256
 
450
- * **graphing:** fix errors that appear in IBX in console ([b07b7c7](https://github.com/pie-framework/pie-lib/commit/b07b7c718bef596b3963a1f9b626f12ff575a86a))
451
-
452
-
453
-
454
-
257
+ - **graphing:** fix errors that appear in IBX in console ([b07b7c7](https://github.com/pie-framework/pie-lib/commit/b07b7c718bef596b3963a1f9b626f12ff575a86a))
455
258
 
456
259
  # [2.10.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.9.1...@pie-lib/graphing@2.10.0) (2022-08-15)
457
260
 
458
-
459
261
  ### Features
460
262
 
461
- * **graphing, plot:** added pixel guide lines + ui improvements ([02ddff1](https://github.com/pie-framework/pie-lib/commit/02ddff1aed6a279b8a4ae1fcf100c766596c29c4))
462
-
463
-
464
-
465
-
263
+ - **graphing, plot:** added pixel guide lines + ui improvements ([02ddff1](https://github.com/pie-framework/pie-lib/commit/02ddff1aed6a279b8a4ae1fcf100c766596c29c4))
466
264
 
467
265
  ## [2.9.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.9.0...@pie-lib/graphing@2.9.1) (2022-08-08)
468
266
 
469
267
  **Note:** Version bump only for package @pie-lib/graphing
470
268
 
471
-
472
-
473
-
474
-
475
269
  # [2.9.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.8.1...@pie-lib/graphing@2.9.0) (2022-08-01)
476
270
 
477
-
478
271
  ### Features
479
272
 
480
- * **graphing, editable-html, plot:** Added the ability to edit/center title and lables PD-1605 PD-1690 ([dd18f92](https://github.com/pie-framework/pie-lib/commit/dd18f92e19d8be98917cd4f19eb7211122d2b7fb))
481
-
482
-
483
-
484
-
273
+ - **graphing, editable-html, plot:** Added the ability to edit/center title and lables PD-1605 PD-1690 ([dd18f92](https://github.com/pie-framework/pie-lib/commit/dd18f92e19d8be98917cd4f19eb7211122d2b7fb))
485
274
 
486
275
  ## [2.8.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.8.0...@pie-lib/graphing@2.8.1) (2022-07-18)
487
276
 
488
277
  **Note:** Version bump only for package @pie-lib/graphing
489
278
 
490
-
491
-
492
-
493
-
494
279
  # [2.8.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.7.0...@pie-lib/graphing@2.8.0) (2022-07-18)
495
280
 
496
-
497
281
  ### Features
498
282
 
499
- * **graphing:** added drag and drop sorting for toolbar tools PD-1607 ([2463c86](https://github.com/pie-framework/pie-lib/commit/2463c86bf6ff42222e98e4344fc6c9fd040d9774))
500
-
501
-
502
-
503
-
283
+ - **graphing:** added drag and drop sorting for toolbar tools PD-1607 ([2463c86](https://github.com/pie-framework/pie-lib/commit/2463c86bf6ff42222e98e4344fc6c9fd040d9774))
504
284
 
505
285
  # [2.7.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.3...@pie-lib/graphing@2.7.0) (2022-06-27)
506
286
 
507
-
508
287
  ### Features
509
288
 
510
- * **graphing:** added collapsible panel for graph toolbar PD-1693 ([4268bb0](https://github.com/pie-framework/pie-lib/commit/4268bb06093d1fabf82d9f5c2d8fd81f9788a4fe))
511
- * **graphing:** Added default value for current drawing tool PD-1689 ([bc9b1b0](https://github.com/pie-framework/pie-lib/commit/bc9b1b00d64d50d138f3ab0991957d9fecaed17b))
512
- * **graphing:** Added the ability to control the fields displayed into Grid Setup PD-1688 ([1f0f3eb](https://github.com/pie-framework/pie-lib/commit/1f0f3eb58c5dcd923e2452a0071bf1de40535bb2))
513
- * added support for graph configuration constraints PD-1683 PD-1684 PD-1686 ([8da7426](https://github.com/pie-framework/pie-lib/commit/8da74260b28332b976fa1c50796e74679fd46a13))
514
- * created setup panel and added basic functionalities PD-1679 ([183eda1](https://github.com/pie-framework/pie-lib/commit/183eda10b2f4128cd831c5b27f14ebccb6b3e7b2))
515
-
516
-
517
-
518
-
289
+ - **graphing:** added collapsible panel for graph toolbar PD-1693 ([4268bb0](https://github.com/pie-framework/pie-lib/commit/4268bb06093d1fabf82d9f5c2d8fd81f9788a4fe))
290
+ - **graphing:** Added default value for current drawing tool PD-1689 ([bc9b1b0](https://github.com/pie-framework/pie-lib/commit/bc9b1b00d64d50d138f3ab0991957d9fecaed17b))
291
+ - **graphing:** Added the ability to control the fields displayed into Grid Setup PD-1688 ([1f0f3eb](https://github.com/pie-framework/pie-lib/commit/1f0f3eb58c5dcd923e2452a0071bf1de40535bb2))
292
+ - added support for graph configuration constraints PD-1683 PD-1684 PD-1686 ([8da7426](https://github.com/pie-framework/pie-lib/commit/8da74260b28332b976fa1c50796e74679fd46a13))
293
+ - created setup panel and added basic functionalities PD-1679 ([183eda1](https://github.com/pie-framework/pie-lib/commit/183eda10b2f4128cd831c5b27f14ebccb6b3e7b2))
519
294
 
520
295
  ## [2.6.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.2...@pie-lib/graphing@2.6.3) (2022-06-13)
521
296
 
522
297
  **Note:** Version bump only for package @pie-lib/graphing
523
298
 
524
-
525
-
526
-
527
-
528
299
  ## [2.6.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.1...@pie-lib/graphing@2.6.2) (2022-05-30)
529
300
 
530
-
531
301
  ### Bug Fixes
532
302
 
533
- * unable to load items locally ([17ab686](https://github.com/pie-framework/pie-lib/commit/17ab6864557288aef6ec1d9a130cb508e2591562))
534
-
535
-
536
-
537
-
303
+ - unable to load items locally ([17ab686](https://github.com/pie-framework/pie-lib/commit/17ab6864557288aef6ec1d9a130cb508e2591562))
538
304
 
539
305
  ## [2.6.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.6.0...@pie-lib/graphing@2.6.1) (2022-05-24)
540
306
 
541
307
  **Note:** Version bump only for package @pie-lib/graphing
542
308
 
543
-
544
-
545
-
546
-
547
309
  # [2.6.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.5.1...@pie-lib/graphing@2.6.0) (2022-05-10)
548
310
 
549
-
550
311
  ### Features
551
312
 
552
- * **graphing:** new design treatment for gridlines PD-1691 ([ee06081](https://github.com/pie-framework/pie-lib/commit/ee06081141cf343ed6767ef203a7629e6c873c5c))
553
- * **graphing, plot:** Added padding between labels and graph without changing the size of graph PD-1604 ([aa93191](https://github.com/pie-framework/pie-lib/commit/aa931910c56efddaf54d4586dc0730a9688e25e3))
554
-
555
-
556
-
557
-
313
+ - **graphing:** new design treatment for gridlines PD-1691 ([ee06081](https://github.com/pie-framework/pie-lib/commit/ee06081141cf343ed6767ef203a7629e6c873c5c))
314
+ - **graphing, plot:** Added padding between labels and graph without changing the size of graph PD-1604 ([aa93191](https://github.com/pie-framework/pie-lib/commit/aa931910c56efddaf54d4586dc0730a9688e25e3))
558
315
 
559
316
  ## [2.5.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.5.0...@pie-lib/graphing@2.5.1) (2022-05-04)
560
317
 
561
-
562
318
  ### Bug Fixes
563
319
 
564
- * **graphing:** removed problematic componentDidUpdate ([9347554](https://github.com/pie-framework/pie-lib/commit/93475543422bbb7a62d82121751c2e10969904ec))
565
-
566
-
567
-
568
-
320
+ - **graphing:** removed problematic componentDidUpdate ([9347554](https://github.com/pie-framework/pie-lib/commit/93475543422bbb7a62d82121751c2e10969904ec))
569
321
 
570
322
  # [2.5.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.17...@pie-lib/graphing@2.5.0) (2022-05-03)
571
323
 
572
-
573
324
  ### Features
574
325
 
575
- * **graphing:** updated store on model change PD-1608 ([a3744dd](https://github.com/pie-framework/pie-lib/commit/a3744dd74d90cca280b90657cbd558ce7ab9c288))
576
-
577
-
578
-
579
-
326
+ - **graphing:** updated store on model change PD-1608 ([a3744dd](https://github.com/pie-framework/pie-lib/commit/a3744dd74d90cca280b90657cbd558ce7ab9c288))
580
327
 
581
328
  ## [2.4.17](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.16...@pie-lib/graphing@2.4.17) (2022-04-28)
582
329
 
583
330
  **Note:** Version bump only for package @pie-lib/graphing
584
331
 
585
-
586
-
587
-
588
-
589
332
  ## [2.4.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.15...@pie-lib/graphing@2.4.16) (2022-03-22)
590
333
 
591
-
592
334
  ### Bug Fixes
593
335
 
594
- * Do not change object at address. Instead, create a clone. ([2b683d7](https://github.com/pie-framework/pie-lib/commit/2b683d76853bf057388e6a223671eef3a040dbbf))
595
-
596
-
597
-
598
-
336
+ - Do not change object at address. Instead, create a clone. ([2b683d7](https://github.com/pie-framework/pie-lib/commit/2b683d76853bf057388e6a223671eef3a040dbbf))
599
337
 
600
338
  ## [2.4.15](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.14...@pie-lib/graphing@2.4.15) (2022-03-22)
601
339
 
602
-
603
340
  ### Bug Fixes
604
341
 
605
- * Force disable for background marks ([755cfbc](https://github.com/pie-framework/pie-lib/commit/755cfbcb0c878c8857be28aaeeff6e4a8d6b4e71))
606
-
607
-
608
-
609
-
342
+ - Force disable for background marks ([755cfbc](https://github.com/pie-framework/pie-lib/commit/755cfbcb0c878c8857be28aaeeff6e4a8d6b4e71))
610
343
 
611
344
  ## [2.4.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.13...@pie-lib/graphing@2.4.14) (2022-03-22)
612
345
 
613
-
614
346
  ### Bug Fixes
615
347
 
616
- * Apply different disable styles for background mark and when mark label is not in edit mode. ([a1657ec](https://github.com/pie-framework/pie-lib/commit/a1657ec7562c96bf760bbf936686816700a7d739))
617
-
618
-
619
-
620
-
348
+ - Apply different disable styles for background mark and when mark label is not in edit mode. ([a1657ec](https://github.com/pie-framework/pie-lib/commit/a1657ec7562c96bf760bbf936686816700a7d739))
621
349
 
622
350
  ## [2.4.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.12...@pie-lib/graphing@2.4.13) (2022-03-22)
623
351
 
624
-
625
352
  ### Bug Fixes
626
353
 
627
- * add UI indicator for disabled labels ([d274b3e](https://github.com/pie-framework/pie-lib/commit/d274b3eb024ab909a06d345bf17bc9f23e5d2db0))
628
- * disable labels for the background marks ([c43a269](https://github.com/pie-framework/pie-lib/commit/c43a26941016490b2687f98b2e02c934a96c02ac))
629
-
630
-
631
-
632
-
354
+ - add UI indicator for disabled labels ([d274b3e](https://github.com/pie-framework/pie-lib/commit/d274b3eb024ab909a06d345bf17bc9f23e5d2db0))
355
+ - disable labels for the background marks ([c43a269](https://github.com/pie-framework/pie-lib/commit/c43a26941016490b2687f98b2e02c934a96c02ac))
633
356
 
634
357
  ## [2.4.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.11...@pie-lib/graphing@2.4.12) (2022-03-21)
635
358
 
636
-
637
359
  ### Bug Fixes
638
360
 
639
- * **graphing:** Adjusted vector arrow orientation angle and fixed rendering issue PD-1602 ([0ebf305](https://github.com/pie-framework/pie-lib/commit/0ebf3059707c868145ef85a14c417cbe01f82491))
640
-
641
-
642
-
643
-
361
+ - **graphing:** Adjusted vector arrow orientation angle and fixed rendering issue PD-1602 ([0ebf305](https://github.com/pie-framework/pie-lib/commit/0ebf3059707c868145ef85a14c417cbe01f82491))
644
362
 
645
363
  ## [2.4.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.10...@pie-lib/graphing@2.4.11) (2022-03-21)
646
364
 
647
365
  **Note:** Version bump only for package @pie-lib/graphing
648
366
 
649
-
650
-
651
-
652
-
653
367
  ## [2.4.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.9...@pie-lib/graphing@2.4.10) (2022-03-07)
654
368
 
655
-
656
369
  ### Bug Fixes
657
370
 
658
- * **graphing:** Adjusted the thickness of the shapes when the distance between lines is too small PD-180 ([8ea20a6](https://github.com/pie-framework/pie-lib/commit/8ea20a61ea02d3e1084f3e10e645a76d580c39b5))
659
- * **graphing:** Extended the range and domain axes and also the line and ray endings PD-1509 ([97e43c6](https://github.com/pie-framework/pie-lib/commit/97e43c6ab0ab85dd314cff97fb84a85113ab39a0))
660
- * **graphing:** Increased the calculation accuracy and adjusted range labels PD-1596 ([7cc7570](https://github.com/pie-framework/pie-lib/commit/7cc75701fd759f7e7888e5cccc261978f6e036b0))
661
- * **graphing:** Should not be possible to plot duplicate/identical objects and should be able to choose a point from an existing object when defining a new object PD-1599 PD-1586 ([ac8502d](https://github.com/pie-framework/pie-lib/commit/ac8502dbe3c7e1a4a663bbe56f7f5ff8bab04430))
662
-
663
-
664
-
665
-
371
+ - **graphing:** Adjusted the thickness of the shapes when the distance between lines is too small PD-180 ([8ea20a6](https://github.com/pie-framework/pie-lib/commit/8ea20a61ea02d3e1084f3e10e645a76d580c39b5))
372
+ - **graphing:** Extended the range and domain axes and also the line and ray endings PD-1509 ([97e43c6](https://github.com/pie-framework/pie-lib/commit/97e43c6ab0ab85dd314cff97fb84a85113ab39a0))
373
+ - **graphing:** Increased the calculation accuracy and adjusted range labels PD-1596 ([7cc7570](https://github.com/pie-framework/pie-lib/commit/7cc75701fd759f7e7888e5cccc261978f6e036b0))
374
+ - **graphing:** Should not be possible to plot duplicate/identical objects and should be able to choose a point from an existing object when defining a new object PD-1599 PD-1586 ([ac8502d](https://github.com/pie-framework/pie-lib/commit/ac8502dbe3c7e1a4a663bbe56f7f5ff8bab04430))
666
375
 
667
376
  ## [2.4.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.8...@pie-lib/graphing@2.4.9) (2022-02-04)
668
377
 
669
378
  **Note:** Version bump only for package @pie-lib/graphing
670
379
 
671
-
672
-
673
-
674
-
675
380
  ## [2.4.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.7...@pie-lib/graphing@2.4.8) (2022-02-03)
676
381
 
677
382
  **Note:** Version bump only for package @pie-lib/graphing
678
383
 
679
-
680
-
681
-
682
-
683
384
  ## [2.4.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.6...@pie-lib/graphing@2.4.7) (2022-01-10)
684
385
 
685
386
  **Note:** Version bump only for package @pie-lib/graphing
686
387
 
687
-
688
-
689
-
690
-
691
388
  ## [2.4.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.5...@pie-lib/graphing@2.4.6) (2021-12-13)
692
389
 
693
390
  **Note:** Version bump only for package @pie-lib/graphing
694
391
 
695
-
696
-
697
-
698
-
699
392
  ## [2.4.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.4...@pie-lib/graphing@2.4.5) (2021-11-29)
700
393
 
701
394
  **Note:** Version bump only for package @pie-lib/graphing
702
395
 
703
-
704
-
705
-
706
-
707
396
  ## [2.4.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.3...@pie-lib/graphing@2.4.4) (2021-09-08)
708
397
 
709
398
  **Note:** Version bump only for package @pie-lib/graphing
710
399
 
711
-
712
-
713
-
714
-
715
400
  ## [2.4.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.2...@pie-lib/graphing@2.4.3) (2021-09-08)
716
401
 
717
402
  **Note:** Version bump only for package @pie-lib/graphing
718
403
 
719
-
720
-
721
-
722
-
723
404
  ## [2.4.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.1...@pie-lib/graphing@2.4.2) (2021-08-30)
724
405
 
725
406
  **Note:** Version bump only for package @pie-lib/graphing
726
407
 
727
-
728
-
729
-
730
-
731
408
  ## [2.4.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.0...@pie-lib/graphing@2.4.1) (2021-08-04)
732
409
 
733
410
  **Note:** Version bump only for package @pie-lib/graphing
734
411
 
735
-
736
-
737
-
738
-
739
412
  # [2.4.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.3.2...@pie-lib/graphing@2.4.0) (2021-07-23)
740
413
 
741
414
  ### Features
package/lib/graph.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graph.jsx"],"names":["log","graphPropTypes","axesSettings","PropTypes","shape","AxisPropTypes","backgroundMarks","array","className","string","collapsibleToolbar","bool","collapsibleToolbarTitle","disabledLabels","disabledTitle","domain","types","DomainType","labels","LabelType","labelModeEnabled","coordinatesOnHover","marks","onChangeLabels","func","onChangeMarks","onChangeTitle","range","size","width","number","isRequired","height","showLabels","showPixelGuides","showTitle","title","tools","getMaskSize","x","y","removeBuildingToolIfCurrentToolDiffers","currentTool","buildingMark","filter","m","building","newMarks","type","index","findIndex","splice","Graph","props","setState","labelNode","oldMark","newMark","markData","updatedMark","complete","updateMarks","existing","update","addIfMissing","mark","tool","find","t","Component","point","addPoint","undefined","maskUid","generateMaskId","Math","random","toFixed","labelsPlaceholders","titlePlaceholder","mathMlOptions","graphProps","rootNode","maskSize","common","r","padding","onBgClick","map","getComponent","markType","disabled","isBackground","state","changeMark","completeMark","startDrag","stopDrag","pointerEvents","React","object"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,wBAAN,CAAZ;AAEO,IAAMC,cAAc,GAAG;AAC5BC,EAAAA,YAAY,EAAEC,sBAAUC,KAAV,CAAgBC,mBAAhB,CADc;AAE5BC,EAAAA,eAAe,EAAEH,sBAAUI,KAFC;AAG5BC,EAAAA,SAAS,EAAEL,sBAAUM,MAHO;AAI5BC,EAAAA,kBAAkB,EAAEP,sBAAUQ,IAJF;AAK5BC,EAAAA,uBAAuB,EAAET,sBAAUM,MALP;AAM5BI,EAAAA,cAAc,EAAEV,sBAAUQ,IANE;AAO5BG,EAAAA,aAAa,EAAEX,sBAAUQ,IAPG;AAQ5BI,EAAAA,MAAM,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AA,UAAU,EAAE,MAAI,CAACC,YALnB;AAME,UAAA,OAAO,EAAE,MAAI,CAACR,SANhB;AAOE,UAAA,WAAW,EAAE,MAAI,CAACS,SAPpB;AAQE,UAAA,UAAU,EAAE,MAAI,CAACC,QARnB;AASE,UAAA,SAAS,EAAE,MAAI,CAACJ,KAAL,CAAWtC,SATxB;AAUE,UAAA,YAAY,EAAEb,WAAW,IAAIgD,QAAQ,KAAKhD,WAAW,CAACM;AAVxD,WAWMoC,MAXN,EADF;AAeD,OAnBA,CAfH,eAmCE;AACE,QAAA,GAAG,EAAE,aAAC7B,SAAD;AAAA,iBAAgB,MAAI,CAACA,SAAL,GAAiBA,SAAjC;AAAA,SADP;AAEE,QAAA,CAAC,EAAC,GAFJ;AAGE,QAAA,CAAC,EAAC;AAHJ,SAIM3B,IAJN;AAKE,QAAA,KAAK,EAAE;AAAEsE,UAAAA,aAAa,EAAE;AAAjB;AALT,SAnCF,CAZF,CAhBF,CADF;AA2ED;;;EA9MwBC,kBAAM9B,S;;;iCAApBjB,K,+CAONnD,c;AACHyC,EAAAA,WAAW,EAAEvC,sBAAUiG;;iCARdhD,K,kBAWW;AACpB3B,EAAAA,aAAa,EAAE,yBAAM,CAAE,CADH;AAEpBZ,EAAAA,cAAc,EAAE,KAFI;AAGpBC,EAAAA,aAAa,EAAE;AAHK,C;eAsMTsC,K","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { Root, types, createGraphProps } from '@pie-lib/plot';\nimport debug from 'debug';\n\nimport { Axes, AxisPropTypes } from './axis';\nimport Grid from './grid';\nimport { LabelType } from './labels';\nimport Bg from './bg';\nimport { isDuplicatedMark } from './utils';\n\nconst log = debug('pie-lib:graphing:graph');\n\nexport const graphPropTypes = {\n axesSettings: PropTypes.shape(AxisPropTypes),\n backgroundMarks: PropTypes.array,\n className: PropTypes.string,\n collapsibleToolbar: PropTypes.bool,\n collapsibleToolbarTitle: PropTypes.string,\n disabledLabels: PropTypes.bool,\n disabledTitle: PropTypes.bool,\n domain: types.DomainType,\n labels: PropTypes.shape(LabelType),\n labelModeEnabled: PropTypes.bool,\n coordinatesOnHover: PropTypes.bool,\n marks: PropTypes.array,\n onChangeLabels: PropTypes.func,\n onChangeMarks: PropTypes.func,\n onChangeTitle: PropTypes.func,\n range: types.DomainType,\n size: PropTypes.shape({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n }),\n showLabels: PropTypes.bool,\n showPixelGuides: PropTypes.bool,\n showTitle: PropTypes.bool,\n title: PropTypes.string,\n tools: PropTypes.array,\n};\n\nconst getMaskSize = (size) => ({\n x: -23,\n y: -23,\n width: size.width + 46,\n height: size.height + 46,\n});\n\nexport const removeBuildingToolIfCurrentToolDiffers = ({ marks, currentTool }) => {\n const buildingMark = marks.filter((m) => m.building)[0];\n let newMarks = cloneDeep(marks);\n\n if (buildingMark && currentTool && buildingMark.type !== currentTool.type) {\n const index = newMarks.findIndex((m) => isEqual(m, buildingMark));\n\n if (index >= 0) {\n newMarks.splice(index, 1);\n }\n }\n\n return newMarks;\n};\n\nexport class Graph extends React.Component {\n constructor(props) {\n super(props);\n this.maskUid = this.generateMaskId();\n }\n\n static propTypes = {\n ...graphPropTypes,\n currentTool: PropTypes.object,\n };\n\n static defaultProps = {\n onChangeMarks: () => {},\n disabledLabels: false,\n disabledTitle: false,\n };\n\n state = {};\n\n generateMaskId() {\n return 'graph-' + (Math.random() * 10000).toFixed();\n }\n\n componentDidMount = () => this.setState({ labelNode: this.labelNode });\n\n changeMark = (oldMark, newMark) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n const index = newMarks.findIndex((m) => isEqual(m, oldMark));\n\n if (index >= 0 && !isDuplicatedMark(newMark, marks, oldMark)) {\n newMarks.splice(index, 1, newMark);\n\n onChangeMarks(newMarks);\n }\n };\n\n completeMark = (markData) => {\n const { currentTool, marks } = this.props;\n const buildingMark = marks.filter((m) => m.building)[0];\n\n if (!buildingMark || !currentTool) return;\n\n const updatedMark = currentTool.complete(buildingMark, markData);\n\n this.updateMarks(buildingMark, updatedMark);\n };\n\n updateMarks = (existing, update, addIfMissing = false) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n if (!update.building && isDuplicatedMark(update, marks)) {\n return;\n }\n\n const index = newMarks.findIndex((m) => isEqual(m, existing));\n\n if (index >= 0) {\n newMarks.splice(index, 1, update);\n\n onChangeMarks(newMarks);\n } else if (addIfMissing) {\n onChangeMarks([...newMarks, update]);\n }\n };\n\n getComponent = (mark) => {\n if (!mark) return null;\n\n const tool = (this.props.tools || []).find((t) => t.type === mark.type);\n\n return (tool && tool.Component) || null;\n };\n\n onBgClick = (point) => {\n const { x, y } = point;\n const { labelModeEnabled, currentTool, marks } = this.props;\n\n log('[onBgClick] x,y: ', x, y);\n\n if (labelModeEnabled || !currentTool) {\n return;\n }\n\n const buildingMark = marks.filter((m) => m.building)[0];\n let updatedMark;\n\n // if the building mark has a different type, we just replace it\n if (buildingMark && currentTool && buildingMark.type === currentTool.type) {\n updatedMark = currentTool.addPoint({ x, y }, { ...buildingMark });\n } else {\n updatedMark = currentTool.addPoint({ x, y }, undefined);\n }\n\n this.updateMarks(buildingMark, updatedMark, true);\n };\n\n render() {\n const {\n axesSettings,\n currentTool,\n coordinatesOnHover,\n size,\n disabledLabels,\n disabledTitle,\n domain,\n backgroundMarks,\n range,\n title,\n labels,\n labelModeEnabled,\n labelsPlaceholders,\n showLabels,\n showPixelGuides,\n showTitle,\n titlePlaceholder,\n onChangeLabels,\n onChangeTitle,\n mathMlOptions = {}\n } = this.props;\n let { marks } = this.props;\n\n const graphProps = createGraphProps(domain, range, size, () => this.rootNode);\n\n const maskSize = getMaskSize(size);\n const common = { graphProps, labelModeEnabled };\n\n marks = removeBuildingToolIfCurrentToolDiffers({ marks: marks || [], currentTool });\n\n return (\n <Root\n rootRef={(r) => (this.rootNode = r)}\n disabledTitle={disabledTitle}\n disabledLabels={disabledLabels}\n labels={labels}\n labelsPlaceholders={labelsPlaceholders || {}}\n showPixelGuides={showPixelGuides}\n showLabels={showLabels}\n showTitle={showTitle}\n title={title}\n titlePlaceholder={titlePlaceholder}\n onChangeTitle={onChangeTitle}\n onChangeLabels={onChangeLabels}\n mathMlOptions={mathMlOptions}\n {...common}\n >\n <g\n transform={\n domain && domain.padding && domain.range ? `translate(${domain.padding}, ${range.padding})` : undefined\n }\n >\n <Grid {...common} />\n <Axes {...axesSettings} {...common} />\n <Bg {...size} onClick={this.onBgClick} {...common} />\n <mask id={`${this.maskUid}`}>\n <rect {...maskSize} fill=\"white\" /> {/* TODO hardcoded color */}\n </mask>\n\n <g id=\"marks\" mask={`url('#${this.maskUid}')`}>\n {(backgroundMarks || []).map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}-bg`}\n mark={{ ...m, disabled: true, isBackground: true }}\n labelNode={this.state.labelNode}\n {...common}\n />\n );\n })}\n\n {marks.map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}`}\n mark={m}\n coordinatesOnHover={coordinatesOnHover}\n onChange={this.changeMark}\n onComplete={this.completeMark}\n onClick={this.onBgClick}\n onDragStart={this.startDrag}\n onDragStop={this.stopDrag}\n labelNode={this.state.labelNode}\n isToolActive={currentTool && markType === currentTool.type}\n {...common}\n />\n );\n })}\n <foreignObject\n ref={(labelNode) => (this.labelNode = labelNode)}\n x=\"0\"\n y=\"0\"\n {...size}\n style={{ pointerEvents: 'none' }}\n />\n </g>\n </g>\n </Root>\n );\n }\n}\n\nexport default Graph;\n"],"file":"graph.js"}
1
+ {"version":3,"sources":["../src/graph.jsx"],"names":["log","graphPropTypes","axesSettings","PropTypes","shape","AxisPropTypes","backgroundMarks","array","className","string","collapsibleToolbar","bool","collapsibleToolbarTitle","disabledLabels","disabledTitle","domain","types","DomainType","labels","LabelType","labelModeEnabled","coordinatesOnHover","marks","onChangeLabels","func","onChangeMarks","onChangeTitle","range","size","width","number","isRequired","height","showLabels","showPixelGuides","showTitle","title","tools","getMaskSize","x","y","removeBuildingToolIfCurrentToolDiffers","currentTool","buildingMark","filter","m","building","newMarks","type","index","findIndex","splice","Graph","props","setState","labelNode","oldMark","newMark","markData","updatedMark","complete","updateMarks","existing","update","addIfMissing","mark","tool","find","t","Component","point","addPoint","undefined","maskUid","generateMaskId","Math","random","toFixed","labelsPlaceholders","titlePlaceholder","mathMlOptions","graphProps","rootNode","maskSize","common","r","padding","onBgClick","map","getComponent","markType","disabled","isBackground","state","changeMark","completeMark","startDrag","stopDrag","pointerEvents","React","object"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,wBAAN,CAAZ;AAEO,IAAMC,cAAc,GAAG;AAC5BC,EAAAA,YAAY,EAAEC,sBAAUC,KAAV,CAAgBC,mBAAhB,CADc;AAE5BC,EAAAA,eAAe,EAAEH,sBAAUI,KAFC;AAG5BC,EAAAA,SAAS,EAAEL,sBAAUM,MAHO;AAI5BC,EAAAA,kBAAkB,EAAEP,sBAAUQ,IAJF;AAK5BC,EAAAA,uBAAuB,EAAET,sBAAUM,MALP;AAM5BI,EAAAA,cAAc,EAAEV,sBAAUQ,IANE;AAO5BG,EAAAA,aAAa,EAAEX,sBAAUQ,IAPG;AAQ5BI,EAAAA,MAAM,EAAEC,YAAMC,UARc;AAS5BC,EAAAA,MAAM,EAAEf,sBAAUC,KAAV,CAAgBe,iBAAhB,CAToB;AAU5BC,EAAAA,gBAAgB,EAAEjB,sBAAUQ,IAVA;AAW5BU,EAAAA,kBAAkB,EAAElB,sBAAUQ,IAXF;AAY5BW,EAAAA,KAAK,EAAEnB,sBAAUI,KAZW;AAa5BgB,EAAAA,cAAc,EAAEpB,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QAAQ,KAAKhD,WAAW,CAACM;AAVxD,WAWMoC,MAXN,EADF;AAeD,OAnBA,CAfH,eAmCE;AACE,QAAA,GAAG,EAAE,aAAC7B,SAAD;AAAA,iBAAgB,MAAI,CAACA,SAAL,GAAiBA,SAAjC;AAAA,SADP;AAEE,QAAA,CAAC,EAAC,GAFJ;AAGE,QAAA,CAAC,EAAC;AAHJ,SAIM3B,IAJN;AAKE,QAAA,KAAK,EAAE;AAAEsE,UAAAA,aAAa,EAAE;AAAjB;AALT,SAnCF,CAZF,CAhBF,CADF;AA2ED;;;EA9MwBC,kBAAM9B,S;;;iCAApBjB,K,+CAONnD,c;AACHyC,EAAAA,WAAW,EAAEvC,sBAAUiG;;iCARdhD,K,kBAWW;AACpB3B,EAAAA,aAAa,EAAE,yBAAM,CAAE,CADH;AAEpBZ,EAAAA,cAAc,EAAE,KAFI;AAGpBC,EAAAA,aAAa,EAAE;AAHK,C;eAsMTsC,K","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { Root, types, createGraphProps } from '@pie-lib/plot';\nimport debug from 'debug';\n\nimport { Axes, AxisPropTypes } from './axis';\nimport Grid from './grid';\nimport { LabelType } from './labels';\nimport Bg from './bg';\nimport { isDuplicatedMark } from './utils';\n\nconst log = debug('pie-lib:graphing:graph');\n\nexport const graphPropTypes = {\n axesSettings: PropTypes.shape(AxisPropTypes),\n backgroundMarks: PropTypes.array,\n className: PropTypes.string,\n collapsibleToolbar: PropTypes.bool,\n collapsibleToolbarTitle: PropTypes.string,\n disabledLabels: PropTypes.bool,\n disabledTitle: PropTypes.bool,\n domain: types.DomainType,\n labels: PropTypes.shape(LabelType),\n labelModeEnabled: PropTypes.bool,\n coordinatesOnHover: PropTypes.bool,\n marks: PropTypes.array,\n onChangeLabels: PropTypes.func,\n onChangeMarks: PropTypes.func,\n onChangeTitle: PropTypes.func,\n range: types.DomainType,\n size: PropTypes.shape({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n }),\n showLabels: PropTypes.bool,\n showPixelGuides: PropTypes.bool,\n showTitle: PropTypes.bool,\n title: PropTypes.string,\n tools: PropTypes.array,\n};\n\nconst getMaskSize = (size) => ({\n x: -23,\n y: -23,\n width: size.width + 46,\n height: size.height + 46,\n});\n\nexport const removeBuildingToolIfCurrentToolDiffers = ({ marks, currentTool }) => {\n const buildingMark = marks.filter((m) => m.building)[0];\n let newMarks = cloneDeep(marks);\n\n if (buildingMark && currentTool && buildingMark.type !== currentTool.type) {\n const index = newMarks.findIndex((m) => isEqual(m, buildingMark));\n\n if (index >= 0) {\n newMarks.splice(index, 1);\n }\n }\n\n return newMarks;\n};\n\nexport class Graph extends React.Component {\n constructor(props) {\n super(props);\n this.maskUid = this.generateMaskId();\n }\n\n static propTypes = {\n ...graphPropTypes,\n currentTool: PropTypes.object,\n };\n\n static defaultProps = {\n onChangeMarks: () => {},\n disabledLabels: false,\n disabledTitle: false,\n };\n\n state = {};\n\n generateMaskId() {\n return 'graph-' + (Math.random() * 10000).toFixed();\n }\n\n componentDidMount = () => this.setState({ labelNode: this.labelNode });\n\n changeMark = (oldMark, newMark) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n const index = newMarks.findIndex((m) => isEqual(m, oldMark));\n\n if (index >= 0 && !isDuplicatedMark(newMark, marks, oldMark)) {\n newMarks.splice(index, 1, newMark);\n\n onChangeMarks(newMarks);\n }\n };\n\n completeMark = (markData) => {\n const { currentTool, marks } = this.props;\n const buildingMark = marks.filter((m) => m.building)[0];\n\n if (!buildingMark || !currentTool) return;\n\n const updatedMark = currentTool.complete(buildingMark, markData);\n\n this.updateMarks(buildingMark, updatedMark);\n };\n\n updateMarks = (existing, update, addIfMissing = false) => {\n const { onChangeMarks, marks } = this.props;\n let newMarks = cloneDeep(marks);\n\n if (!update.building && isDuplicatedMark(update, marks)) {\n return;\n }\n\n const index = newMarks.findIndex((m) => isEqual(m, existing));\n\n if (index >= 0) {\n newMarks.splice(index, 1, update);\n\n onChangeMarks(newMarks);\n } else if (addIfMissing) {\n onChangeMarks([...newMarks, update]);\n }\n };\n\n getComponent = (mark) => {\n if (!mark) return null;\n\n const tool = (this.props.tools || []).find((t) => t.type === mark.type);\n\n return (tool && tool.Component) || null;\n };\n\n onBgClick = (point) => {\n const { x, y } = point;\n const { labelModeEnabled, currentTool, marks } = this.props;\n\n log('[onBgClick] x,y: ', x, y);\n\n if (labelModeEnabled || !currentTool) {\n return;\n }\n\n const buildingMark = marks.filter((m) => m.building)[0];\n let updatedMark;\n\n // if the building mark has a different type, we just replace it\n if (buildingMark && currentTool && buildingMark.type === currentTool.type) {\n updatedMark = currentTool.addPoint({ x, y }, { ...buildingMark });\n } else {\n updatedMark = currentTool.addPoint({ x, y }, undefined);\n }\n\n this.updateMarks(buildingMark, updatedMark, true);\n };\n\n render() {\n const {\n axesSettings,\n currentTool,\n coordinatesOnHover,\n size,\n disabledLabels,\n disabledTitle,\n domain,\n backgroundMarks,\n range,\n title,\n labels,\n labelModeEnabled,\n labelsPlaceholders,\n showLabels,\n showPixelGuides,\n showTitle,\n titlePlaceholder,\n onChangeLabels,\n onChangeTitle,\n mathMlOptions = {},\n } = this.props;\n let { marks } = this.props;\n\n const graphProps = createGraphProps(domain, range, size, () => this.rootNode);\n\n const maskSize = getMaskSize(size);\n const common = { graphProps, labelModeEnabled };\n\n marks = removeBuildingToolIfCurrentToolDiffers({ marks: marks || [], currentTool });\n\n return (\n <Root\n rootRef={(r) => (this.rootNode = r)}\n disabledTitle={disabledTitle}\n disabledLabels={disabledLabels}\n labels={labels}\n labelsPlaceholders={labelsPlaceholders || {}}\n showPixelGuides={showPixelGuides}\n showLabels={showLabels}\n showTitle={showTitle}\n title={title}\n titlePlaceholder={titlePlaceholder}\n onChangeTitle={onChangeTitle}\n onChangeLabels={onChangeLabels}\n mathMlOptions={mathMlOptions}\n {...common}\n >\n <g\n transform={\n domain && domain.padding && domain.range ? `translate(${domain.padding}, ${range.padding})` : undefined\n }\n >\n <Grid {...common} />\n <Axes {...axesSettings} {...common} />\n <Bg {...size} onClick={this.onBgClick} {...common} />\n <mask id={`${this.maskUid}`}>\n <rect {...maskSize} fill=\"white\" /> {/* TODO hardcoded color */}\n </mask>\n\n <g id=\"marks\" mask={`url('#${this.maskUid}')`}>\n {(backgroundMarks || []).map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}-bg`}\n mark={{ ...m, disabled: true, isBackground: true }}\n labelNode={this.state.labelNode}\n {...common}\n />\n );\n })}\n\n {marks.map((m, index) => {\n const Component = this.getComponent(m);\n const markType = m.type;\n\n return (\n <Component\n key={`${markType}-${index}`}\n mark={m}\n coordinatesOnHover={coordinatesOnHover}\n onChange={this.changeMark}\n onComplete={this.completeMark}\n onClick={this.onBgClick}\n onDragStart={this.startDrag}\n onDragStop={this.stopDrag}\n labelNode={this.state.labelNode}\n isToolActive={currentTool && markType === currentTool.type}\n {...common}\n />\n );\n })}\n <foreignObject\n ref={(labelNode) => (this.labelNode = labelNode)}\n x=\"0\"\n y=\"0\"\n {...size}\n style={{ pointerEvents: 'none' }}\n />\n </g>\n </g>\n </Root>\n );\n }\n}\n\nexport default Graph;\n"],"file":"graph.js"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.14.2-next.0+ec542de5",
6
+ "version": "2.14.2",
7
7
  "description": "Graphing components",
8
8
  "keywords": [
9
9
  "react",
@@ -18,11 +18,11 @@
18
18
  "dependencies": {
19
19
  "@mapbox/point-geometry": "^0.1.0",
20
20
  "@material-ui/core": "^3.8.3",
21
- "@pie-lib/drag": "^2.2.1-next.0+ec542de5",
21
+ "@pie-lib/drag": "^2.2.0",
22
22
  "@pie-lib/graphing-utils": "^1.1.32",
23
- "@pie-lib/plot": "^2.7.0",
24
- "@pie-lib/render-ui": "^4.14.26",
25
- "@pie-lib/translator": "^2.0.0",
23
+ "@pie-lib/plot": "^2.7.1",
24
+ "@pie-lib/render-ui": "^4.14.27",
25
+ "@pie-lib/translator": "^2.1.0",
26
26
  "@vx/axis": "^0.0.189",
27
27
  "@vx/clip-path": "^0.0.189",
28
28
  "@vx/event": "^0.0.189",
@@ -45,6 +45,6 @@
45
45
  "peerDependencies": {
46
46
  "react": "^16.8.1"
47
47
  },
48
- "gitHead": "ec542de5af85f84a5b466a00266fb7b71fe260c1",
48
+ "gitHead": "b76cbf501c964c9905cff2f16a811c47c16f9e1d",
49
49
  "scripts": {}
50
50
  }
package/src/graph.jsx CHANGED
@@ -183,7 +183,7 @@ export class Graph extends React.Component {
183
183
  titlePlaceholder,
184
184
  onChangeLabels,
185
185
  onChangeTitle,
186
- mathMlOptions = {}
186
+ mathMlOptions = {},
187
187
  } = this.props;
188
188
  let { marks } = this.props;
189
189