@pie-lib/charting 5.50.0-mui-update.0 → 6.1.0-next.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.
Files changed (117) hide show
  1. package/CHANGELOG.md +19 -143
  2. package/lib/__tests__/axes.test.js +129 -0
  3. package/lib/__tests__/chart-setup.test.js +57 -0
  4. package/lib/__tests__/chart-type.test.js +25 -0
  5. package/lib/__tests__/chart.test.js +103 -0
  6. package/lib/__tests__/grid.test.js +39 -0
  7. package/lib/__tests__/mark-label.test.js +46 -0
  8. package/lib/__tests__/utils.js +56 -0
  9. package/lib/__tests__/utils.test.js +186 -0
  10. package/lib/actions-button.js +1 -1
  11. package/lib/axes.js +14 -10
  12. package/lib/axes.js.map +1 -1
  13. package/lib/bars/__tests__/bar.test.js +53 -0
  14. package/lib/bars/__tests__/histogram.test.js +53 -0
  15. package/lib/bars/__tests__/utils.js +50 -0
  16. package/lib/bars/bar.js +1 -1
  17. package/lib/bars/common/__tests__/bars.test.js +76 -0
  18. package/lib/bars/common/__tests__/utils.js +50 -0
  19. package/lib/bars/common/bars.js +3 -2
  20. package/lib/bars/common/bars.js.map +1 -1
  21. package/lib/bars/common/correct-check-icon.js +5 -1
  22. package/lib/bars/common/correct-check-icon.js.map +1 -1
  23. package/lib/bars/histogram.js +1 -1
  24. package/lib/chart-setup.js +9 -11
  25. package/lib/chart-setup.js.map +1 -1
  26. package/lib/chart-type.js +15 -1
  27. package/lib/chart-type.js.map +1 -1
  28. package/lib/chart-types.js +1 -1
  29. package/lib/chart.js +2 -5
  30. package/lib/chart.js.map +1 -1
  31. package/lib/common/__tests__/drag-handle.test.js +74 -0
  32. package/lib/common/__tests__/utils.js +50 -0
  33. package/lib/common/correctness-indicators.js +38 -3
  34. package/lib/common/correctness-indicators.js.map +1 -1
  35. package/lib/common/drag-handle.js +3 -5
  36. package/lib/common/drag-handle.js.map +1 -1
  37. package/lib/common/drag-icon.js +7 -1
  38. package/lib/common/drag-icon.js.map +1 -1
  39. package/lib/common/styles.js +1 -1
  40. package/lib/grid.js +1 -1
  41. package/lib/index.js +1 -1
  42. package/lib/key-legend.js +1 -1
  43. package/lib/line/__tests__/line-cross.test.js +47 -0
  44. package/lib/line/__tests__/line-dot.test.js +47 -0
  45. package/lib/line/__tests__/utils.js +56 -0
  46. package/lib/line/common/__tests__/drag-handle.test.js +74 -0
  47. package/lib/line/common/__tests__/line.test.js +92 -0
  48. package/lib/line/common/__tests__/utils.js +50 -0
  49. package/lib/line/common/drag-handle.js +4 -1
  50. package/lib/line/common/drag-handle.js.map +1 -1
  51. package/lib/line/common/line.js +7 -3
  52. package/lib/line/common/line.js.map +1 -1
  53. package/lib/line/line-cross.js +1 -1
  54. package/lib/line/line-dot.js +17 -19
  55. package/lib/line/line-dot.js.map +1 -1
  56. package/lib/mark-label.js +11 -4
  57. package/lib/mark-label.js.map +1 -1
  58. package/lib/plot/__tests__/dot.test.js +53 -0
  59. package/lib/plot/__tests__/line.test.js +53 -0
  60. package/lib/plot/__tests__/utils.js +50 -0
  61. package/lib/plot/common/__tests__/plot.test.js +79 -0
  62. package/lib/plot/common/__tests__/utils.js +50 -0
  63. package/lib/plot/common/plot.js +14 -3
  64. package/lib/plot/common/plot.js.map +1 -1
  65. package/lib/plot/dot.js +1 -1
  66. package/lib/plot/line.js +1 -1
  67. package/lib/tool-menu.js +1 -1
  68. package/lib/utils.js +1 -1
  69. package/package.json +9 -6
  70. package/src/__tests__/axes.test.jsx +85 -100
  71. package/src/__tests__/chart-type.test.jsx +5 -11
  72. package/src/__tests__/chart.test.jsx +41 -50
  73. package/src/__tests__/grid.test.jsx +23 -11
  74. package/src/__tests__/mark-label.test.jsx +13 -11
  75. package/src/__tests__/utils.js +8 -2
  76. package/src/axes.jsx +6 -6
  77. package/src/bars/__tests__/bar.test.jsx +19 -11
  78. package/src/bars/__tests__/histogram.test.jsx +19 -12
  79. package/src/bars/common/__tests__/bars.test.jsx +23 -24
  80. package/src/bars/common/bars.jsx +1 -0
  81. package/src/bars/common/correct-check-icon.jsx +5 -0
  82. package/src/chart-setup.jsx +6 -9
  83. package/src/chart-type.js +16 -0
  84. package/src/chart.jsx +11 -13
  85. package/src/common/__tests__/drag-handle.test.jsx +16 -45
  86. package/src/common/correctness-indicators.jsx +42 -2
  87. package/src/common/drag-handle.jsx +1 -3
  88. package/src/common/drag-icon.jsx +7 -0
  89. package/src/line/__tests__/line-cross.test.jsx +16 -13
  90. package/src/line/__tests__/line-dot.test.jsx +16 -13
  91. package/src/line/__tests__/utils.js +8 -2
  92. package/src/line/common/__tests__/drag-handle.test.jsx +20 -45
  93. package/src/line/common/__tests__/line.test.jsx +27 -30
  94. package/src/line/common/drag-handle.jsx +4 -0
  95. package/src/line/common/line.jsx +4 -0
  96. package/src/line/line-dot.js +1 -1
  97. package/src/mark-label.jsx +8 -3
  98. package/src/plot/__tests__/dot.test.jsx +19 -12
  99. package/src/plot/__tests__/line.test.jsx +19 -12
  100. package/src/plot/common/__tests__/plot.test.jsx +23 -24
  101. package/src/plot/common/plot.jsx +11 -0
  102. package/src/__tests__/__snapshots__/axes.test.jsx.snap +0 -569
  103. package/src/__tests__/__snapshots__/chart-type.test.jsx.snap +0 -14
  104. package/src/__tests__/__snapshots__/chart.test.jsx.snap +0 -595
  105. package/src/__tests__/__snapshots__/grid.test.jsx.snap +0 -72
  106. package/src/__tests__/__snapshots__/mark-label.test.jsx.snap +0 -73
  107. package/src/bars/__tests__/__snapshots__/bar.test.jsx.snap +0 -43
  108. package/src/bars/__tests__/__snapshots__/histogram.test.jsx.snap +0 -45
  109. package/src/bars/common/__tests__/__snapshots__/bars.test.jsx.snap +0 -110
  110. package/src/common/__tests__/__snapshots__/drag-handle.test.jsx.snap +0 -48
  111. package/src/line/__tests__/__snapshots__/line-cross.test.jsx.snap +0 -45
  112. package/src/line/__tests__/__snapshots__/line-dot.test.jsx.snap +0 -45
  113. package/src/line/common/__tests__/__snapshots__/drag-handle.test.jsx.snap +0 -49
  114. package/src/line/common/__tests__/__snapshots__/line.test.jsx.snap +0 -143
  115. package/src/plot/__tests__/__snapshots__/dot.test.jsx.snap +0 -45
  116. package/src/plot/__tests__/__snapshots__/line.test.jsx.snap +0 -45
  117. package/src/plot/common/__tests__/__snapshots__/plot.test.jsx.snap +0 -97
@@ -1,595 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ChartAxes snapshot renders 1`] = `
4
- <div
5
- className="className"
6
- >
7
- <WithStyles(Root)
8
- defineChart={false}
9
- disabledLabels={true}
10
- disabledTitle={true}
11
- graphProps={
12
- Object {
13
- "domain": Object {
14
- "labelStep": 1,
15
- "max": 1,
16
- "min": 0,
17
- "step": 1,
18
- },
19
- "getRootNode": [Function],
20
- "range": Object {
21
- "labelStep": 1,
22
- "max": 10,
23
- "min": 0,
24
- "step": 1,
25
- },
26
- "scale": Object {
27
- "x": [Function],
28
- "y": [Function],
29
- },
30
- "size": Object {
31
- "height": 160,
32
- "width": 100,
33
- },
34
- "snap": Object {
35
- "x": [Function],
36
- "y": [Function],
37
- },
38
- }
39
- }
40
- isChart={true}
41
- labels={
42
- Object {
43
- "bottom": "",
44
- "left": "",
45
- }
46
- }
47
- mathMlOptions={Object {}}
48
- rootRef={[Function]}
49
- showLabels={true}
50
- showTitle={true}
51
- >
52
- <WithStyles(Grid)
53
- columnTickValues={Array []}
54
- graphProps={
55
- Object {
56
- "domain": Object {
57
- "labelStep": 1,
58
- "max": 1,
59
- "min": 0,
60
- "step": 1,
61
- },
62
- "getRootNode": [Function],
63
- "range": Object {
64
- "labelStep": 1,
65
- "max": 10,
66
- "min": 0,
67
- "step": 1,
68
- },
69
- "scale": Object {
70
- "x": [Function],
71
- "y": [Function],
72
- },
73
- "size": Object {
74
- "height": 100,
75
- "width": 100,
76
- },
77
- "snap": Object {
78
- "x": [Function],
79
- "y": [Function],
80
- },
81
- }
82
- }
83
- rowTickValues={
84
- Array [
85
- 0,
86
- 1,
87
- 2,
88
- 3,
89
- 4,
90
- 5,
91
- 6,
92
- 7,
93
- 8,
94
- 9,
95
- 10,
96
- ]
97
- }
98
- xBand={[Function]}
99
- />
100
- <WithStyles(RawChartAxes)
101
- categories={Array []}
102
- defineChart={false}
103
- graphProps={
104
- Object {
105
- "domain": Object {
106
- "labelStep": 1,
107
- "max": 1,
108
- "min": 0,
109
- "step": 1,
110
- },
111
- "getRootNode": [Function],
112
- "range": Object {
113
- "labelStep": 1,
114
- "max": 10,
115
- "min": 0,
116
- "step": 1,
117
- },
118
- "scale": Object {
119
- "x": [Function],
120
- "y": [Function],
121
- },
122
- "size": Object {
123
- "height": 100,
124
- "width": 100,
125
- },
126
- "snap": Object {
127
- "x": [Function],
128
- "y": [Function],
129
- },
130
- }
131
- }
132
- leftAxis={true}
133
- onAutoFocusUsed={[Function]}
134
- onChange={[Function]}
135
- onChangeCategory={[Function]}
136
- showCorrectness={false}
137
- top={0}
138
- xBand={[Function]}
139
- />
140
- <mask
141
- id="chart-2645"
142
- >
143
- <rect
144
- fill="white"
145
- height={230}
146
- width={120}
147
- x={-10}
148
- y={-75}
149
- />
150
- </mask>
151
- <g
152
- id="marks"
153
- mask="url('#chart-2645')"
154
- >
155
- <Component
156
- data={Array []}
157
- defineChart={false}
158
- graphProps={
159
- Object {
160
- "domain": Object {
161
- "labelStep": 1,
162
- "max": 1,
163
- "min": 0,
164
- "step": 1,
165
- },
166
- "getRootNode": [Function],
167
- "range": Object {
168
- "labelStep": 1,
169
- "max": 10,
170
- "min": 0,
171
- "step": 1,
172
- },
173
- "scale": Object {
174
- "x": [Function],
175
- "y": [Function],
176
- },
177
- "size": Object {
178
- "height": 100,
179
- "width": 100,
180
- },
181
- "snap": Object {
182
- "x": [Function],
183
- "y": [Function],
184
- },
185
- }
186
- }
187
- height={160}
188
- onChange={[Function]}
189
- onChangeCategory={[Function]}
190
- />
191
- </g>
192
- </WithStyles(Root)>
193
- <WithStyles(AlertDialog)
194
- open={false}
195
- />
196
- </div>
197
- `;
198
-
199
- exports[`ChartAxes snapshot renders if size is not defined 1`] = `
200
- <div
201
- className="className"
202
- >
203
- <WithStyles(Root)
204
- defineChart={false}
205
- disabledLabels={true}
206
- disabledTitle={true}
207
- graphProps={
208
- Object {
209
- "domain": Object {
210
- "labelStep": 1,
211
- "max": 1,
212
- "min": 0,
213
- "step": 1,
214
- },
215
- "getRootNode": [Function],
216
- "range": Object {
217
- "labelStep": 1,
218
- "max": 10,
219
- "min": 0,
220
- "step": 1,
221
- },
222
- "scale": Object {
223
- "x": [Function],
224
- "y": [Function],
225
- },
226
- "size": Object {
227
- "height": 540,
228
- "width": 480,
229
- },
230
- "snap": Object {
231
- "x": [Function],
232
- "y": [Function],
233
- },
234
- }
235
- }
236
- isChart={true}
237
- labels={
238
- Object {
239
- "bottom": "",
240
- "left": "",
241
- }
242
- }
243
- mathMlOptions={Object {}}
244
- rootRef={[Function]}
245
- showLabels={true}
246
- showTitle={true}
247
- >
248
- <WithStyles(Grid)
249
- columnTickValues={Array []}
250
- graphProps={
251
- Object {
252
- "domain": Object {
253
- "labelStep": 1,
254
- "max": 1,
255
- "min": 0,
256
- "step": 1,
257
- },
258
- "getRootNode": [Function],
259
- "range": Object {
260
- "labelStep": 1,
261
- "max": 10,
262
- "min": 0,
263
- "step": 1,
264
- },
265
- "scale": Object {
266
- "x": [Function],
267
- "y": [Function],
268
- },
269
- "size": Object {
270
- "height": 480,
271
- "width": 480,
272
- },
273
- "snap": Object {
274
- "x": [Function],
275
- "y": [Function],
276
- },
277
- }
278
- }
279
- rowTickValues={
280
- Array [
281
- 0,
282
- 1,
283
- 2,
284
- 3,
285
- 4,
286
- 5,
287
- 6,
288
- 7,
289
- 8,
290
- 9,
291
- 10,
292
- ]
293
- }
294
- xBand={[Function]}
295
- />
296
- <WithStyles(RawChartAxes)
297
- categories={Array []}
298
- defineChart={false}
299
- graphProps={
300
- Object {
301
- "domain": Object {
302
- "labelStep": 1,
303
- "max": 1,
304
- "min": 0,
305
- "step": 1,
306
- },
307
- "getRootNode": [Function],
308
- "range": Object {
309
- "labelStep": 1,
310
- "max": 10,
311
- "min": 0,
312
- "step": 1,
313
- },
314
- "scale": Object {
315
- "x": [Function],
316
- "y": [Function],
317
- },
318
- "size": Object {
319
- "height": 480,
320
- "width": 480,
321
- },
322
- "snap": Object {
323
- "x": [Function],
324
- "y": [Function],
325
- },
326
- }
327
- }
328
- leftAxis={true}
329
- onAutoFocusUsed={[Function]}
330
- onChange={[Function]}
331
- onChangeCategory={[Function]}
332
- showCorrectness={false}
333
- top={0}
334
- xBand={[Function]}
335
- />
336
- <mask
337
- id="chart-1553"
338
- >
339
- <rect
340
- fill="white"
341
- height={610}
342
- width={500}
343
- x={-10}
344
- y={-75}
345
- />
346
- </mask>
347
- <g
348
- id="marks"
349
- mask="url('#chart-1553')"
350
- >
351
- <Component
352
- data={Array []}
353
- defineChart={false}
354
- graphProps={
355
- Object {
356
- "domain": Object {
357
- "labelStep": 1,
358
- "max": 1,
359
- "min": 0,
360
- "step": 1,
361
- },
362
- "getRootNode": [Function],
363
- "range": Object {
364
- "labelStep": 1,
365
- "max": 10,
366
- "min": 0,
367
- "step": 1,
368
- },
369
- "scale": Object {
370
- "x": [Function],
371
- "y": [Function],
372
- },
373
- "size": Object {
374
- "height": 480,
375
- "width": 480,
376
- },
377
- "snap": Object {
378
- "x": [Function],
379
- "y": [Function],
380
- },
381
- }
382
- }
383
- height={540}
384
- onChange={[Function]}
385
- onChangeCategory={[Function]}
386
- />
387
- </g>
388
- </WithStyles(Root)>
389
- <WithStyles(AlertDialog)
390
- open={false}
391
- />
392
- </div>
393
- `;
394
-
395
- exports[`ChartAxes snapshot renders with chartType property and empty charts property 1`] = `""`;
396
-
397
- exports[`ChartAxes snapshot renders without chartType and charts properties 1`] = `""`;
398
-
399
- exports[`ChartAxes snapshot renders without chartType property 1`] = `
400
- <div
401
- className="className"
402
- >
403
- <WithStyles(Root)
404
- defineChart={false}
405
- disabledLabels={true}
406
- disabledTitle={true}
407
- graphProps={
408
- Object {
409
- "domain": Object {
410
- "labelStep": 1,
411
- "max": 1,
412
- "min": 0,
413
- "step": 1,
414
- },
415
- "getRootNode": [Function],
416
- "range": Object {
417
- "labelStep": 1,
418
- "max": 10,
419
- "min": 0,
420
- "step": 1,
421
- },
422
- "scale": Object {
423
- "x": [Function],
424
- "y": [Function],
425
- },
426
- "size": Object {
427
- "height": 160,
428
- "width": 100,
429
- },
430
- "snap": Object {
431
- "x": [Function],
432
- "y": [Function],
433
- },
434
- }
435
- }
436
- isChart={true}
437
- labels={
438
- Object {
439
- "bottom": "",
440
- "left": "",
441
- }
442
- }
443
- mathMlOptions={Object {}}
444
- rootRef={[Function]}
445
- showLabels={true}
446
- showTitle={true}
447
- >
448
- <WithStyles(Grid)
449
- columnTickValues={Array []}
450
- graphProps={
451
- Object {
452
- "domain": Object {
453
- "labelStep": 1,
454
- "max": 1,
455
- "min": 0,
456
- "step": 1,
457
- },
458
- "getRootNode": [Function],
459
- "range": Object {
460
- "labelStep": 1,
461
- "max": 10,
462
- "min": 0,
463
- "step": 1,
464
- },
465
- "scale": Object {
466
- "x": [Function],
467
- "y": [Function],
468
- },
469
- "size": Object {
470
- "height": 100,
471
- "width": 100,
472
- },
473
- "snap": Object {
474
- "x": [Function],
475
- "y": [Function],
476
- },
477
- }
478
- }
479
- rowTickValues={
480
- Array [
481
- 0,
482
- 1,
483
- 2,
484
- 3,
485
- 4,
486
- 5,
487
- 6,
488
- 7,
489
- 8,
490
- 9,
491
- 10,
492
- ]
493
- }
494
- xBand={[Function]}
495
- />
496
- <WithStyles(RawChartAxes)
497
- categories={Array []}
498
- defineChart={false}
499
- graphProps={
500
- Object {
501
- "domain": Object {
502
- "labelStep": 1,
503
- "max": 1,
504
- "min": 0,
505
- "step": 1,
506
- },
507
- "getRootNode": [Function],
508
- "range": Object {
509
- "labelStep": 1,
510
- "max": 10,
511
- "min": 0,
512
- "step": 1,
513
- },
514
- "scale": Object {
515
- "x": [Function],
516
- "y": [Function],
517
- },
518
- "size": Object {
519
- "height": 100,
520
- "width": 100,
521
- },
522
- "snap": Object {
523
- "x": [Function],
524
- "y": [Function],
525
- },
526
- }
527
- }
528
- leftAxis={true}
529
- onAutoFocusUsed={[Function]}
530
- onChange={[Function]}
531
- onChangeCategory={[Function]}
532
- showCorrectness={false}
533
- top={0}
534
- xBand={[Function]}
535
- />
536
- <mask
537
- id="chart-4286"
538
- >
539
- <rect
540
- fill="white"
541
- height={230}
542
- width={120}
543
- x={-10}
544
- y={-75}
545
- />
546
- </mask>
547
- <g
548
- id="marks"
549
- mask="url('#chart-4286')"
550
- >
551
- <Component
552
- data={Array []}
553
- defineChart={false}
554
- graphProps={
555
- Object {
556
- "domain": Object {
557
- "labelStep": 1,
558
- "max": 1,
559
- "min": 0,
560
- "step": 1,
561
- },
562
- "getRootNode": [Function],
563
- "range": Object {
564
- "labelStep": 1,
565
- "max": 10,
566
- "min": 0,
567
- "step": 1,
568
- },
569
- "scale": Object {
570
- "x": [Function],
571
- "y": [Function],
572
- },
573
- "size": Object {
574
- "height": 100,
575
- "width": 100,
576
- },
577
- "snap": Object {
578
- "x": [Function],
579
- "y": [Function],
580
- },
581
- }
582
- }
583
- height={160}
584
- onChange={[Function]}
585
- onChangeCategory={[Function]}
586
- />
587
- </g>
588
- </WithStyles(Root)>
589
- <WithStyles(AlertDialog)
590
- open={false}
591
- />
592
- </div>
593
- `;
594
-
595
- exports[`ChartAxes snapshot renders without chartType property and empty charts property 1`] = `""`;
@@ -1,72 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Grid snapshot renders 1`] = `
4
- <g
5
- className="className"
6
- >
7
- <q
8
- lineStyle={
9
- Object {
10
- "stroke": "var(--pie-faded-primary, #DCDAFB)",
11
- "strokeWidth": 1,
12
- }
13
- }
14
- scale={[MockFunction]}
15
- tickValues={Array []}
16
- width={400}
17
- />
18
- <q
19
- lineStyle={
20
- Object {
21
- "stroke": "#8E88EA",
22
- "strokeWidth": 1,
23
- }
24
- }
25
- scale={[MockFunction]}
26
- tickValues={Array []}
27
- width={400}
28
- />
29
- <V
30
- height={400}
31
- offset={NaN}
32
- scale={
33
- Object {
34
- "bandwidth": [Function],
35
- }
36
- }
37
- />
38
- </g>
39
- `;
40
-
41
- exports[`Grid snapshot renders if graphProps is not defined 1`] = `
42
- <g
43
- className="className"
44
- >
45
- <q
46
- lineStyle={
47
- Object {
48
- "stroke": "var(--pie-faded-primary, #DCDAFB)",
49
- "strokeWidth": 1,
50
- }
51
- }
52
- tickValues={Array []}
53
- />
54
- <q
55
- lineStyle={
56
- Object {
57
- "stroke": "#8E88EA",
58
- "strokeWidth": 1,
59
- }
60
- }
61
- tickValues={Array []}
62
- />
63
- <V
64
- offset={NaN}
65
- scale={
66
- Object {
67
- "bandwidth": [Function],
68
- }
69
- }
70
- />
71
- </g>
72
- `;