@gravity-ui/chartkit 1.4.3 → 1.5.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.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.5.0](https://github.com/gravity-ui/chartkit/compare/v1.4.3...v1.5.0) (2022-12-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * add stacking positive and mixed values in stacked area ([#105](https://github.com/gravity-ui/chartkit/issues/105)) ([3f0cc62](https://github.com/gravity-ui/chartkit/commit/3f0cc628613aad1016b009253e09a8682ca05d2c))
9
+
3
10
  ## [1.4.3](https://github.com/gravity-ui/chartkit/compare/v1.4.2...v1.4.3) (2022-12-14)
4
11
 
5
12
 
@@ -2,65 +2,217 @@ export const data = {
2
2
  data: {
3
3
  graphs: [
4
4
  {
5
- title: 'Appliances',
5
+ title: 'Sales',
6
+ tooltip: {
7
+ chartKitFormatting: true,
8
+ chartKitPrecision: 2,
9
+ },
10
+ data: [
11
+ {
12
+ y: 167387.5003761053,
13
+ },
14
+ {
15
+ y: 107532.49998930097,
16
+ },
17
+ {
18
+ y: 27119.399931907654,
19
+ },
20
+ {
21
+ y: 203415.90024918318,
22
+ },
23
+ {
24
+ y: 114882.00052642822,
25
+ },
26
+ {
27
+ y: 328452.60130500793,
28
+ },
29
+ {
30
+ y: 149529.49963378906,
31
+ },
32
+ {
33
+ y: 16477.799976468086,
34
+ },
35
+ {
36
+ y: 3024.2000015974045,
37
+ },
38
+ {
39
+ y: 91708.29990947247,
40
+ },
41
+ {
42
+ y: 12485.399973154068,
43
+ },
44
+ {
45
+ y: 189239.5000743866,
46
+ },
47
+ {
48
+ y: 78483.89996623993,
49
+ },
50
+ {
51
+ y: 330018.3997364044,
52
+ },
53
+ {
54
+ y: 223844.49978113174,
55
+ },
56
+ {
57
+ y: 46673.600484371185,
58
+ },
59
+ {
60
+ y: 206966.50039672852,
61
+ },
62
+ ],
63
+ legendTitle: 'Sales',
64
+ connectNulls: false,
65
+ yAxis: 0,
66
+ color: '#8AD554',
67
+ },
68
+ {
69
+ title: 'Profit',
6
70
  tooltip: {
7
71
  chartKitFormatting: true,
8
72
  chartKitPrecision: 0,
9
73
  },
10
74
  data: [
11
75
  {
12
- y: 2420,
13
- x: 2014,
76
+ y: 41615,
77
+ },
78
+ {
79
+ y: 17927,
80
+ },
81
+ {
82
+ y: 6156,
83
+ },
84
+ {
85
+ y: 29550,
86
+ },
87
+ {
88
+ y: -3568,
89
+ },
90
+ {
91
+ y: 26316,
92
+ },
93
+ {
94
+ y: 55618,
95
+ },
96
+ {
97
+ y: 6849,
98
+ },
99
+ {
100
+ y: 850,
101
+ },
102
+ {
103
+ y: 12649,
14
104
  },
15
105
  {
16
- y: 2472,
17
- x: 2015,
106
+ y: 5367,
18
107
  },
19
108
  {
20
- y: 5248,
21
- x: 2016,
109
+ y: 3353,
22
110
  },
23
111
  {
24
- y: 7787,
25
- x: 2017,
112
+ y: 33437,
113
+ },
114
+ {
115
+ y: 44171,
116
+ },
117
+ {
118
+ y: 20907,
119
+ },
120
+ {
121
+ y: -1262,
122
+ },
123
+ {
124
+ y: -17865,
26
125
  },
27
126
  ],
28
- legendTitle: 'Appliances',
127
+ legendTitle: 'Profit',
29
128
  connectNulls: false,
30
129
  yAxis: 0,
31
130
  color: '#FF3D64',
32
131
  },
33
132
  {
34
- title: 'Bookcases',
133
+ title: 'Px2',
35
134
  tooltip: {
36
135
  chartKitFormatting: true,
37
136
  chartKitPrecision: 0,
38
137
  },
39
138
  data: [
40
139
  {
41
- y: -363,
42
- x: 2014,
140
+ y: 83230,
141
+ },
142
+ {
143
+ y: 35854,
144
+ },
145
+ {
146
+ y: 12312,
43
147
  },
44
148
  {
45
- y: -2777,
46
- x: 2015,
149
+ y: 59100,
47
150
  },
48
151
  {
49
- y: 1880,
50
- x: 2016,
152
+ y: -7136,
51
153
  },
52
154
  {
53
- y: -616,
54
- x: 2017,
155
+ y: 52632,
156
+ },
157
+ {
158
+ y: 111236,
159
+ },
160
+ {
161
+ y: 13698,
162
+ },
163
+ {
164
+ y: 1700,
165
+ },
166
+ {
167
+ y: 25298,
168
+ },
169
+ {
170
+ y: 10734,
171
+ },
172
+ {
173
+ y: 6706,
174
+ },
175
+ {
176
+ y: 66874,
177
+ },
178
+ {
179
+ y: 88342,
180
+ },
181
+ {
182
+ y: 41814,
183
+ },
184
+ {
185
+ y: -2524,
186
+ },
187
+ {
188
+ y: -35730,
55
189
  },
56
190
  ],
57
- legendTitle: 'Bookcases',
191
+ legendTitle: 'Px2',
58
192
  connectNulls: false,
59
193
  yAxis: 0,
60
- color: '#8AD554',
194
+ color: '#4DA2F1',
61
195
  },
62
196
  ],
63
- categories: ['2014', '2015', '2016', '2017'],
197
+ categories: [
198
+ 'Accessories',
199
+ 'Appliances',
200
+ 'Art',
201
+ 'Binders',
202
+ 'Bookcases',
203
+ 'Chairs',
204
+ 'Copiers',
205
+ 'Envelopes',
206
+ 'Fasteners',
207
+ 'Furnishings',
208
+ 'Labels',
209
+ 'Machines',
210
+ 'Paper',
211
+ 'Phones',
212
+ 'Storage',
213
+ 'Supplies',
214
+ 'Tables',
215
+ ],
64
216
  },
65
217
  config: {
66
218
  withoutLineLimit: true,
@@ -1470,13 +1470,8 @@ export function prepareConfig(data, options, isMobile, holidays) {
1470
1470
  return false;
1471
1471
  }
1472
1472
  }, false);
1473
- if (serieHasIntersectionWithOthers) {
1474
- if (hasPositiveValues && !hasNegativeValues) {
1475
- serie.stack = 'positive';
1476
- }
1477
- else if (!hasPositiveValues && hasNegativeValues) {
1478
- serie.stack = 'negative';
1479
- }
1473
+ if (serieHasIntersectionWithOthers && !hasPositiveValues && hasNegativeValues) {
1474
+ serie.stack = 'negative';
1480
1475
  }
1481
1476
  }
1482
1477
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "description": "React component used to render charts based on any sources you need",
5
5
  "license": "MIT",
6
6
  "repository": "git@github.com:gravity-ui/ChartKit.git",