@pie-lib/charting 5.17.0-beta.0 → 5.17.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 +1 -581
- package/CHANGELOG.md +149 -43
- package/package.json +5 -5
- package/src/__tests__/__snapshots__/axes.test.jsx.snap +1 -0
- package/src/__tests__/__snapshots__/chart.test.jsx.snap +0 -18
- package/src/__tests__/__snapshots__/grid.test.jsx.snap +61 -17
- package/src/__tests__/axes.test.jsx +0 -5
- package/src/__tests__/chart.test.jsx +8 -0
- package/src/actions-button.jsx +109 -0
- package/src/axes.jsx +5 -31
- package/src/bars/common/bars.jsx +8 -10
- package/src/chart-setup.jsx +1 -1
- package/src/chart.jsx +31 -26
- package/src/common/drag-handle.jsx +3 -3
- package/src/common/styles.js +1 -1
- package/src/grid.jsx +38 -13
- package/src/index.js +2 -1
- package/src/key-legend.jsx +75 -0
- package/src/line/common/drag-handle.jsx +3 -9
- package/src/line/common/line.jsx +2 -6
- package/src/line/line-cross.js +29 -2
- package/src/line/line-dot.js +36 -19
- package/src/mark-label.jsx +7 -2
- package/src/plot/common/plot.jsx +8 -5
- package/src/tool-menu.jsx +1 -1
- package/lib/__tests__/axes.test.js +0 -181
- package/lib/__tests__/chart-setup.test.js +0 -58
- package/lib/__tests__/chart-type.test.js +0 -42
- package/lib/__tests__/chart.test.js +0 -108
- package/lib/__tests__/grid.test.js +0 -48
- package/lib/__tests__/mark-label.test.js +0 -57
- package/lib/__tests__/utils.js +0 -56
- package/lib/__tests__/utils.test.js +0 -197
- package/lib/axes.js +0 -643
- package/lib/bars/__tests__/bar.test.js +0 -62
- package/lib/bars/__tests__/histogram.test.js +0 -64
- package/lib/bars/__tests__/utils.js +0 -56
- package/lib/bars/bar.js +0 -86
- package/lib/bars/common/__tests__/bars.test.js +0 -100
- package/lib/bars/common/__tests__/utils.js +0 -56
- package/lib/bars/common/bars.js +0 -301
- package/lib/bars/histogram.js +0 -87
- package/lib/chart-setup.js +0 -458
- package/lib/chart-type.js +0 -71
- package/lib/chart-types.js +0 -31
- package/lib/chart.js +0 -438
- package/lib/common/__tests__/drag-handle.test.js +0 -134
- package/lib/common/__tests__/utils.js +0 -56
- package/lib/common/drag-handle.js +0 -175
- package/lib/common/drag-icon.js +0 -52
- package/lib/common/styles.js +0 -40
- package/lib/grid.js +0 -104
- package/lib/index.js +0 -40
- package/lib/line/__tests__/line-cross.test.js +0 -64
- package/lib/line/__tests__/line-dot.test.js +0 -64
- package/lib/line/__tests__/utils.js +0 -56
- package/lib/line/common/__tests__/drag-handle.test.js +0 -134
- package/lib/line/common/__tests__/line.test.js +0 -128
- package/lib/line/common/__tests__/utils.js +0 -56
- package/lib/line/common/drag-handle.js +0 -157
- package/lib/line/common/line.js +0 -261
- package/lib/line/line-cross.js +0 -168
- package/lib/line/line-dot.js +0 -131
- package/lib/mark-label.js +0 -255
- package/lib/plot/__tests__/dot.test.js +0 -64
- package/lib/plot/__tests__/line.test.js +0 -64
- package/lib/plot/__tests__/utils.js +0 -56
- package/lib/plot/common/__tests__/plot.test.js +0 -103
- package/lib/plot/common/__tests__/utils.js +0 -56
- package/lib/plot/common/plot.js +0 -280
- package/lib/plot/dot.js +0 -123
- package/lib/plot/line.js +0 -152
- package/lib/tool-menu.js +0 -142
- package/lib/utils.js +0 -244
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
|
-
# [5.17.0
|
|
6
|
+
# [5.17.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.17.0) (2025-07-31)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/charting
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
# [5.
|
|
14
|
+
# [5.18.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.18.0) (2025-07-31)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @pie-lib/charting
|
|
17
17
|
|
|
@@ -19,111 +19,103 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
# [5.17.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.17.0) (2025-07-31)
|
|
23
23
|
|
|
24
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
24
25
|
|
|
25
|
-
### Bug Fixes
|
|
26
26
|
|
|
27
|
-
* **charting:** add sanity check for data PD-3223 ([f573866](https://github.com/pie-framework/pie-lib/commit/f57386626933cdb5b8b6a1c0f91b45b6ea1b9ca7))
|
|
28
|
-
* **charting:** address overlap of drag handle with category labels in charts PD-3223 ([ebe212e](https://github.com/pie-framework/pie-lib/commit/ebe212ecd315d6445b1d676568482fa47b40ebdb))
|
|
29
|
-
* **charting:** limit number of categories in Define Correct Response Chart to 20 ([0b0e8ab](https://github.com/pie-framework/pie-lib/commit/0b0e8ab339126e00703c1ae5218c714bbcdb6dbf))
|
|
30
|
-
* **charting:** refine error message display to prevent overlapping with other elements and other messages PD-3121 ([f2de1ad](https://github.com/pie-framework/pie-lib/commit/f2de1adb4d19a44e403beb3d88cbb333e3c5adb9))
|
|
31
|
-
* **charting:** use red boxes only and for all duplicated category names, reorder CSS selectors to resolve styling conflicts, only display the validation message a single time for duplicate categories and for empty labels PD-3121 ([7cae40b](https://github.com/pie-framework/pie-lib/commit/7cae40b48a1da661d7d7c97780098a07e5b1d336))
|
|
32
27
|
|
|
33
28
|
|
|
34
29
|
|
|
30
|
+
# [5.16.0-beta.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.8) (2025-07-25)
|
|
35
31
|
|
|
32
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
36
33
|
|
|
37
|
-
## [5.15.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.4...@pie-lib/charting@5.15.5) (2023-09-28)
|
|
38
34
|
|
|
39
35
|
|
|
40
|
-
### Bug Fixes
|
|
41
36
|
|
|
42
|
-
* **charting:** add drop shadow to evaluate bars PD-2790 ([328c730](https://github.com/pie-framework/pie-lib/commit/328c7308d026ca6e00575d47bdfaf1d9e4779d16))
|
|
43
37
|
|
|
38
|
+
# [5.16.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.7) (2025-07-25)
|
|
44
39
|
|
|
40
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
45
41
|
|
|
46
42
|
|
|
47
43
|
|
|
48
|
-
## [5.15.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.3...@pie-lib/charting@5.15.4) (2023-09-28)
|
|
49
44
|
|
|
50
45
|
|
|
51
|
-
|
|
46
|
+
# [5.16.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.7) (2025-07-25)
|
|
52
47
|
|
|
53
|
-
|
|
54
|
-
* **charting:** limit number of categories in Define Initial Chart Attributes to 20 PD-3128 ([b0da731](https://github.com/pie-framework/pie-lib/commit/b0da731a619c9d13a8b12e16a6e81dc924261396))
|
|
48
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
55
49
|
|
|
56
50
|
|
|
57
51
|
|
|
58
52
|
|
|
59
53
|
|
|
60
|
-
|
|
54
|
+
# [5.16.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.6) (2025-07-25)
|
|
61
55
|
|
|
56
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
62
57
|
|
|
63
|
-
### Bug Fixes
|
|
64
58
|
|
|
65
|
-
* **charting:** adjust icon for the drag handle PD-2790 ([fe670d7](https://github.com/pie-framework/pie-lib/commit/fe670d7a04f44da5c93dadbeec41b753ce50f9f6))
|
|
66
59
|
|
|
67
60
|
|
|
68
61
|
|
|
62
|
+
# [5.16.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.6) (2025-07-25)
|
|
69
63
|
|
|
64
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
70
65
|
|
|
71
|
-
## [5.15.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.1...@pie-lib/charting@5.15.2) (2023-09-25)
|
|
72
66
|
|
|
73
67
|
|
|
74
|
-
### Bug Fixes
|
|
75
68
|
|
|
76
|
-
* add required packages for charting to work ([c7af164](https://github.com/pie-framework/pie-lib/commit/c7af16427245d0c0c5c041e296a1cfdf034b7b64))
|
|
77
69
|
|
|
70
|
+
# [5.16.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.5) (2025-07-25)
|
|
78
71
|
|
|
72
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
79
73
|
|
|
80
74
|
|
|
81
75
|
|
|
82
|
-
## [5.15.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.0...@pie-lib/charting@5.15.1) (2023-09-25)
|
|
83
76
|
|
|
84
77
|
|
|
85
|
-
|
|
78
|
+
# [5.16.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.5) (2025-07-25)
|
|
86
79
|
|
|
87
|
-
|
|
80
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
88
81
|
|
|
89
82
|
|
|
90
83
|
|
|
91
84
|
|
|
92
85
|
|
|
93
|
-
# [5.
|
|
86
|
+
# [5.16.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.4) (2025-07-25)
|
|
94
87
|
|
|
88
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
95
89
|
|
|
96
|
-
### Bug Fixes
|
|
97
90
|
|
|
98
|
-
* **charting:** set labelWidth to prevent outline from intersecting InputLabel for the ChartType menu PD-3166 ([ff9ca2b](https://github.com/pie-framework/pie-lib/commit/ff9ca2b9812d0afd209edccac2feecac396111cc))
|
|
99
91
|
|
|
100
92
|
|
|
101
|
-
### Features
|
|
102
93
|
|
|
103
|
-
|
|
104
|
-
* **charting:** adjust y-coordinate in maskSize for better chart fitting after adding new design, tweaks in design PD-2790 ([0edf288](https://github.com/pie-framework/pie-lib/commit/0edf2880c8c8c0e0e51df080aa582d071f0f1e52))
|
|
105
|
-
* **charting:** make style dynamic for drag icon PD-2790 ([aed8c81](https://github.com/pie-framework/pie-lib/commit/aed8c818cbc70910a7e31566c94dd731d068efa1))
|
|
106
|
-
* **charting:** Replace drag-enabled horizontal bars with widget for author and gather mode PD-2790, refactor RawDragHandle component ([e0a369a](https://github.com/pie-framework/pie-lib/commit/e0a369ad2aaf9cf5d3aa3ac061c23316443b35fb))
|
|
94
|
+
# [5.16.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.3) (2025-07-25)
|
|
107
95
|
|
|
96
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
108
97
|
|
|
109
98
|
|
|
110
99
|
|
|
111
100
|
|
|
112
|
-
## [5.14.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.2...@pie-lib/charting@5.14.3) (2023-09-18)
|
|
113
101
|
|
|
102
|
+
# [5.16.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.4) (2025-07-23)
|
|
114
103
|
|
|
115
|
-
|
|
104
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
116
105
|
|
|
117
|
-
* **charting:** add tests for resetValues PD-3105 ([972a3cd](https://github.com/pie-framework/pie-lib/commit/972a3cd4b3787352ffe4073085cbd22f91895b43))
|
|
118
|
-
* **charting:** wip PD-3105 ([9e21836](https://github.com/pie-framework/pie-lib/commit/9e21836ad8c89c7c839c6561db5edc0329a6a6af))
|
|
119
|
-
* **charting:** wip PD-3105 ([f2f8234](https://github.com/pie-framework/pie-lib/commit/f2f82343a373ae1a8f669754a061963cbfdbeb08))
|
|
120
|
-
* **charting:** wip PD-3105 revert push in develop ([6cce5e2](https://github.com/pie-framework/pie-lib/commit/6cce5e2d25d079c1c3eb195425dc2cf016fcd36e))
|
|
121
106
|
|
|
122
107
|
|
|
123
108
|
|
|
124
109
|
|
|
110
|
+
# [5.16.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.3) (2025-07-23)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
125
113
|
|
|
126
|
-
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# [5.16.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.3) (2025-07-20)
|
|
127
119
|
|
|
128
120
|
**Note:** Version bump only for package @pie-lib/charting
|
|
129
121
|
|
|
@@ -131,7 +123,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
131
123
|
|
|
132
124
|
|
|
133
125
|
|
|
134
|
-
|
|
126
|
+
# [5.16.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.2) (2025-07-20)
|
|
135
127
|
|
|
136
128
|
**Note:** Version bump only for package @pie-lib/charting
|
|
137
129
|
|
|
@@ -139,16 +131,130 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
139
131
|
|
|
140
132
|
|
|
141
133
|
|
|
142
|
-
# [5.
|
|
134
|
+
# [5.16.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.1) (2025-07-20)
|
|
135
|
+
|
|
136
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
# [5.16.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.2) (2025-07-20)
|
|
143
|
+
|
|
144
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
# [5.16.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.1) (2025-07-20)
|
|
151
|
+
|
|
152
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# [5.16.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.1) (2025-07-20)
|
|
159
|
+
|
|
160
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
143
164
|
|
|
144
165
|
|
|
166
|
+
# [5.16.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.0) (2025-07-20)
|
|
167
|
+
|
|
168
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
# [5.17.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.17.0-beta.0) (2025-07-15)
|
|
175
|
+
|
|
176
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
177
|
+
|
|
178
|
+
# [5.16.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.0) (2025-07-15)
|
|
179
|
+
|
|
180
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
181
|
+
|
|
182
|
+
## [5.15.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.5...@pie-lib/charting@5.15.6) (2023-10-16)
|
|
183
|
+
|
|
184
|
+
### Bug Fixes
|
|
185
|
+
|
|
186
|
+
- **charting:** add sanity check for data PD-3223 ([f573866](https://github.com/pie-framework/pie-lib/commit/f57386626933cdb5b8b6a1c0f91b45b6ea1b9ca7))
|
|
187
|
+
- **charting:** address overlap of drag handle with category labels in charts PD-3223 ([ebe212e](https://github.com/pie-framework/pie-lib/commit/ebe212ecd315d6445b1d676568482fa47b40ebdb))
|
|
188
|
+
- **charting:** limit number of categories in Define Correct Response Chart to 20 ([0b0e8ab](https://github.com/pie-framework/pie-lib/commit/0b0e8ab339126e00703c1ae5218c714bbcdb6dbf))
|
|
189
|
+
- **charting:** refine error message display to prevent overlapping with other elements and other messages PD-3121 ([f2de1ad](https://github.com/pie-framework/pie-lib/commit/f2de1adb4d19a44e403beb3d88cbb333e3c5adb9))
|
|
190
|
+
- **charting:** use red boxes only and for all duplicated category names, reorder CSS selectors to resolve styling conflicts, only display the validation message a single time for duplicate categories and for empty labels PD-3121 ([7cae40b](https://github.com/pie-framework/pie-lib/commit/7cae40b48a1da661d7d7c97780098a07e5b1d336))
|
|
191
|
+
|
|
192
|
+
## [5.15.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.4...@pie-lib/charting@5.15.5) (2023-09-28)
|
|
193
|
+
|
|
194
|
+
### Bug Fixes
|
|
195
|
+
|
|
196
|
+
- **charting:** add drop shadow to evaluate bars PD-2790 ([328c730](https://github.com/pie-framework/pie-lib/commit/328c7308d026ca6e00575d47bdfaf1d9e4779d16))
|
|
197
|
+
|
|
198
|
+
## [5.15.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.3...@pie-lib/charting@5.15.4) (2023-09-28)
|
|
199
|
+
|
|
200
|
+
### Bug Fixes
|
|
201
|
+
|
|
202
|
+
- **charting:** fix modal warnings ([34dbf3b](https://github.com/pie-framework/pie-lib/commit/34dbf3b04845773d23aa7c91a80fab57e1e78cd0))
|
|
203
|
+
- **charting:** limit number of categories in Define Initial Chart Attributes to 20 PD-3128 ([b0da731](https://github.com/pie-framework/pie-lib/commit/b0da731a619c9d13a8b12e16a6e81dc924261396))
|
|
204
|
+
|
|
205
|
+
## [5.15.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.2...@pie-lib/charting@5.15.3) (2023-09-26)
|
|
206
|
+
|
|
207
|
+
### Bug Fixes
|
|
208
|
+
|
|
209
|
+
- **charting:** adjust icon for the drag handle PD-2790 ([fe670d7](https://github.com/pie-framework/pie-lib/commit/fe670d7a04f44da5c93dadbeec41b753ce50f9f6))
|
|
210
|
+
|
|
211
|
+
## [5.15.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.1...@pie-lib/charting@5.15.2) (2023-09-25)
|
|
212
|
+
|
|
213
|
+
### Bug Fixes
|
|
214
|
+
|
|
215
|
+
- add required packages for charting to work ([c7af164](https://github.com/pie-framework/pie-lib/commit/c7af16427245d0c0c5c041e296a1cfdf034b7b64))
|
|
216
|
+
|
|
217
|
+
## [5.15.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.0...@pie-lib/charting@5.15.1) (2023-09-25)
|
|
218
|
+
|
|
219
|
+
### Bug Fixes
|
|
220
|
+
|
|
221
|
+
- **charting:** add @mui/icons-material to package json PD-2790 ([0262857](https://github.com/pie-framework/pie-lib/commit/026285728f998e3fe31ec43c77e99f2311f9ad22))
|
|
222
|
+
|
|
223
|
+
# [5.15.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.3...@pie-lib/charting@5.15.0) (2023-09-25)
|
|
224
|
+
|
|
225
|
+
### Bug Fixes
|
|
226
|
+
|
|
227
|
+
- **charting:** set labelWidth to prevent outline from intersecting InputLabel for the ChartType menu PD-3166 ([ff9ca2b](https://github.com/pie-framework/pie-lib/commit/ff9ca2b9812d0afd209edccac2feecac396111cc))
|
|
228
|
+
|
|
145
229
|
### Features
|
|
146
230
|
|
|
147
|
-
|
|
231
|
+
- **charting:** add hover effect for plot and bars PD-2790 ([af0d9ba](https://github.com/pie-framework/pie-lib/commit/af0d9bab03fa8146299bf0a1947dbe418e306f85))
|
|
232
|
+
- **charting:** adjust y-coordinate in maskSize for better chart fitting after adding new design, tweaks in design PD-2790 ([0edf288](https://github.com/pie-framework/pie-lib/commit/0edf2880c8c8c0e0e51df080aa582d071f0f1e52))
|
|
233
|
+
- **charting:** make style dynamic for drag icon PD-2790 ([aed8c81](https://github.com/pie-framework/pie-lib/commit/aed8c818cbc70910a7e31566c94dd731d068efa1))
|
|
234
|
+
- **charting:** Replace drag-enabled horizontal bars with widget for author and gather mode PD-2790, refactor RawDragHandle component ([e0a369a](https://github.com/pie-framework/pie-lib/commit/e0a369ad2aaf9cf5d3aa3ac061c23316443b35fb))
|
|
235
|
+
|
|
236
|
+
## [5.14.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.2...@pie-lib/charting@5.14.3) (2023-09-18)
|
|
237
|
+
|
|
238
|
+
### Bug Fixes
|
|
239
|
+
|
|
240
|
+
- **charting:** add tests for resetValues PD-3105 ([972a3cd](https://github.com/pie-framework/pie-lib/commit/972a3cd4b3787352ffe4073085cbd22f91895b43))
|
|
241
|
+
- **charting:** wip PD-3105 ([9e21836](https://github.com/pie-framework/pie-lib/commit/9e21836ad8c89c7c839c6561db5edc0329a6a6af))
|
|
242
|
+
- **charting:** wip PD-3105 ([f2f8234](https://github.com/pie-framework/pie-lib/commit/f2f82343a373ae1a8f669754a061963cbfdbeb08))
|
|
243
|
+
- **charting:** wip PD-3105 revert push in develop ([6cce5e2](https://github.com/pie-framework/pie-lib/commit/6cce5e2d25d079c1c3eb195425dc2cf016fcd36e))
|
|
244
|
+
|
|
245
|
+
## [5.14.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.1...@pie-lib/charting@5.14.2) (2023-08-07)
|
|
246
|
+
|
|
247
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
248
|
+
|
|
249
|
+
## [5.14.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.0...@pie-lib/charting@5.14.1) (2023-06-24)
|
|
148
250
|
|
|
251
|
+
**Note:** Version bump only for package @pie-lib/charting
|
|
149
252
|
|
|
253
|
+
# [5.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.13.0...@pie-lib/charting@5.14.0) (2023-06-13)
|
|
150
254
|
|
|
255
|
+
### Features
|
|
151
256
|
|
|
257
|
+
- **charting, translator:** add translator to charting. add missing text in translator ([2c722a2](https://github.com/pie-framework/pie-lib/commit/2c722a241deb1ad4b51aa22c6eba74a0ec8a5ec0))
|
|
152
258
|
|
|
153
259
|
# [5.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.12.0...@pie-lib/charting@5.13.0) (2023-06-12)
|
|
154
260
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "5.17.0
|
|
6
|
+
"version": "5.17.0",
|
|
7
7
|
"description": "charting",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@mapbox/point-geometry": "^0.1.0",
|
|
21
21
|
"@material-ui/core": "^3.8.3",
|
|
22
|
-
"@pie-lib/plot": "^2.
|
|
23
|
-
"@pie-lib/translator": "^2.
|
|
22
|
+
"@pie-lib/plot": "^2.10.0",
|
|
23
|
+
"@pie-lib/translator": "^2.6.0",
|
|
24
24
|
"@vx/axis": "^0.0.183",
|
|
25
25
|
"@vx/event": "^0.0.182",
|
|
26
26
|
"@vx/grid": "^0.0.183",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"react-input-autosize": "^2.2.1",
|
|
40
40
|
"react-redux": "^6.0.0",
|
|
41
41
|
"redux": "^4.0.1",
|
|
42
|
-
"redux-undo": "
|
|
42
|
+
"redux-undo": "latest"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": "^16.8.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "889a13bfea2c768b8a3a6eabfc6fe7b7725aa832"
|
|
48
48
|
}
|
|
@@ -4,12 +4,6 @@ exports[`ChartAxes snapshot renders 1`] = `
|
|
|
4
4
|
<div
|
|
5
5
|
className="className"
|
|
6
6
|
>
|
|
7
|
-
<div>
|
|
8
|
-
<ToolMenu
|
|
9
|
-
addCategory={[Function]}
|
|
10
|
-
disabled={true}
|
|
11
|
-
/>
|
|
12
|
-
</div>
|
|
13
7
|
<WithStyles(Root)
|
|
14
8
|
defineChart={false}
|
|
15
9
|
disabledLabels={true}
|
|
@@ -205,12 +199,6 @@ exports[`ChartAxes snapshot renders if size is not defined 1`] = `
|
|
|
205
199
|
<div
|
|
206
200
|
className="className"
|
|
207
201
|
>
|
|
208
|
-
<div>
|
|
209
|
-
<ToolMenu
|
|
210
|
-
addCategory={[Function]}
|
|
211
|
-
disabled={true}
|
|
212
|
-
/>
|
|
213
|
-
</div>
|
|
214
202
|
<WithStyles(Root)
|
|
215
203
|
defineChart={false}
|
|
216
204
|
disabledLabels={true}
|
|
@@ -410,12 +398,6 @@ exports[`ChartAxes snapshot renders without chartType property 1`] = `
|
|
|
410
398
|
<div
|
|
411
399
|
className="className"
|
|
412
400
|
>
|
|
413
|
-
<div>
|
|
414
|
-
<ToolMenu
|
|
415
|
-
addCategory={[Function]}
|
|
416
|
-
disabled={true}
|
|
417
|
-
/>
|
|
418
|
-
</div>
|
|
419
401
|
<WithStyles(Root)
|
|
420
402
|
defineChart={false}
|
|
421
403
|
disabledLabels={true}
|
|
@@ -1,28 +1,72 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Grid snapshot renders 1`] = `
|
|
4
|
-
<
|
|
4
|
+
<g
|
|
5
5
|
className="className"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
>
|
|
7
|
+
<q
|
|
8
|
+
lineStyle={
|
|
9
|
+
Object {
|
|
10
|
+
"stroke": "var(--pie-faded-primary, #DCDAFB)",
|
|
11
|
+
"strokeWidth": 1,
|
|
12
|
+
}
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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>
|
|
16
39
|
`;
|
|
17
40
|
|
|
18
41
|
exports[`Grid snapshot renders if graphProps is not defined 1`] = `
|
|
19
|
-
<
|
|
42
|
+
<g
|
|
20
43
|
className="className"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
+
}
|
|
25
69
|
}
|
|
26
|
-
|
|
27
|
-
|
|
70
|
+
/>
|
|
71
|
+
</g>
|
|
28
72
|
`;
|
|
@@ -137,10 +137,5 @@ describe('TickComponent', () => {
|
|
|
137
137
|
w.instance().changeCategory(0, 'new label');
|
|
138
138
|
expect(onChangeCategory).toHaveBeenCalledWith(0, { value: 1, label: 'new label' });
|
|
139
139
|
});
|
|
140
|
-
|
|
141
|
-
it('calls onChange', () => {
|
|
142
|
-
w.instance().deleteCategory(0);
|
|
143
|
-
expect(onChange).toHaveBeenCalledWith([]);
|
|
144
|
-
});
|
|
145
140
|
});
|
|
146
141
|
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
4
|
+
import Button from '@material-ui/core/Button';
|
|
5
|
+
import Popover from '@material-ui/core/Popover';
|
|
6
|
+
import Paper from '@material-ui/core/Paper';
|
|
7
|
+
|
|
8
|
+
import { color } from '../../render-ui/src/index';
|
|
9
|
+
import Translator from '@pie-lib/translator';
|
|
10
|
+
|
|
11
|
+
const { translator } = Translator;
|
|
12
|
+
|
|
13
|
+
export class ActionsButton extends React.Component {
|
|
14
|
+
constructor(props) {
|
|
15
|
+
super(props);
|
|
16
|
+
this.state = {
|
|
17
|
+
actionsAnchorEl: null,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static propTypes = {
|
|
22
|
+
classes: PropTypes.object.isRequired,
|
|
23
|
+
categories: PropTypes.array,
|
|
24
|
+
addCategory: PropTypes.func.isRequired,
|
|
25
|
+
deleteCategory: PropTypes.func.isRequired,
|
|
26
|
+
language: PropTypes.string.isRequired,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
handleActionsClick = (event) => {
|
|
30
|
+
this.setState({ actionsAnchorEl: event.currentTarget });
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
handleActionsClose = () => {
|
|
34
|
+
this.setState({ actionsAnchorEl: null });
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
handleAddCategory = () => {
|
|
38
|
+
const { addCategory } = this.props;
|
|
39
|
+
addCategory();
|
|
40
|
+
this.handleActionsClose();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
handleDeleteCategory = (index) => {
|
|
44
|
+
const { deleteCategory } = this.props;
|
|
45
|
+
deleteCategory(index);
|
|
46
|
+
this.handleActionsClose();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
render() {
|
|
50
|
+
const { classes, categories, language } = this.props;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div className={classes.actions}>
|
|
54
|
+
<div role="button" tabIndex={0} className={classes.trigger} onClick={this.handleActionsClick}>
|
|
55
|
+
Actions
|
|
56
|
+
</div>
|
|
57
|
+
<Popover
|
|
58
|
+
open={Boolean(this.state.actionsAnchorEl)}
|
|
59
|
+
anchorEl={this.state.actionsAnchorEl}
|
|
60
|
+
onClose={this.handleActionsClose}
|
|
61
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}
|
|
62
|
+
transformOrigin={{ vertical: 'top', horizontal: 'left' }}
|
|
63
|
+
>
|
|
64
|
+
<Paper className={classes.actionsPaper}>
|
|
65
|
+
<Button onClick={() => this.handleAddCategory()}>
|
|
66
|
+
+ {translator.t('charting.add', { lng: language })}
|
|
67
|
+
</Button>
|
|
68
|
+
{categories.length > 0 &&
|
|
69
|
+
categories.map(
|
|
70
|
+
(category, index) =>
|
|
71
|
+
category.deletable &&
|
|
72
|
+
!category.correctness && (
|
|
73
|
+
<Button key={index} onClick={() => this.handleDeleteCategory(index)}>
|
|
74
|
+
{`${translator.t('charting.delete', { lng: language })} <${category.label ||
|
|
75
|
+
translator.t('charting.newLabel', { lng: language })}>`}
|
|
76
|
+
</Button>
|
|
77
|
+
),
|
|
78
|
+
)}
|
|
79
|
+
</Paper>
|
|
80
|
+
</Popover>
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const styles = (theme) => ({
|
|
87
|
+
actions: {
|
|
88
|
+
alignSelf: 'flex-end',
|
|
89
|
+
},
|
|
90
|
+
trigger: {
|
|
91
|
+
cursor: 'pointer',
|
|
92
|
+
fontSize: theme.typography.fontSize,
|
|
93
|
+
color: color.tertiary(),
|
|
94
|
+
},
|
|
95
|
+
actionsPaper: {
|
|
96
|
+
padding: theme.spacing.unit,
|
|
97
|
+
display: 'flex',
|
|
98
|
+
flexDirection: 'column',
|
|
99
|
+
gap: theme.spacing.unit,
|
|
100
|
+
'& button': {
|
|
101
|
+
textTransform: 'none',
|
|
102
|
+
fontSize: theme.typography.fontSize,
|
|
103
|
+
color: color.text(),
|
|
104
|
+
justifyContent: 'flex-start',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export default withStyles(styles)(ActionsButton);
|