@gitlab/ui 86.13.0 → 86.14.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,3 +1,17 @@
|
|
|
1
|
+
# [86.14.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.13.1...v86.14.0) (2024-07-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlBadge:** Add animation ([4d35e8f](https://gitlab.com/gitlab-org/gitlab-ui/commit/4d35e8f97df902c9b9c6689cb02cca9c1c1ce863))
|
|
7
|
+
|
|
8
|
+
## [86.13.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.13.0...v86.13.1) (2024-07-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **GlSparklineChart:** Render flat lines with gradient enabled ([a8ad20f](https://gitlab.com/gitlab-org/gitlab-ui/commit/a8ad20f3ffa3efeb7cc545a0e7183b54434a97d2))
|
|
14
|
+
|
|
1
15
|
# [86.13.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.12.1...v86.13.0) (2024-07-17)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -134,15 +134,18 @@ var script = {
|
|
|
134
134
|
const mergedOptions = merge({}, defaultChartOptions, sparkLineChartOptions);
|
|
135
135
|
return mergeSeriesToOptions(mergedOptions, this.series);
|
|
136
136
|
},
|
|
137
|
+
willShowLastYValue() {
|
|
138
|
+
return this.showLastYValue && this.data.length;
|
|
139
|
+
},
|
|
137
140
|
series() {
|
|
138
141
|
const {
|
|
139
142
|
data,
|
|
140
143
|
smooth,
|
|
141
144
|
itemStyle,
|
|
142
|
-
|
|
145
|
+
willShowLastYValue,
|
|
143
146
|
connectNulls
|
|
144
147
|
} = this;
|
|
145
|
-
const markPoint =
|
|
148
|
+
const markPoint = willShowLastYValue ? {
|
|
146
149
|
symbol: 'circle',
|
|
147
150
|
cursor: 'auto',
|
|
148
151
|
animation: false,
|
|
@@ -170,14 +173,34 @@ var script = {
|
|
|
170
173
|
};
|
|
171
174
|
},
|
|
172
175
|
itemStyle() {
|
|
173
|
-
if (this.
|
|
176
|
+
if (this.applyGradient) {
|
|
174
177
|
return {
|
|
175
178
|
color: generateGradient(this.gradient)
|
|
176
179
|
};
|
|
177
180
|
}
|
|
181
|
+
if (this.gradient.length) {
|
|
182
|
+
// If the gradient cannot be used, then apply
|
|
183
|
+
// the first colour to the entire line.
|
|
184
|
+
return {
|
|
185
|
+
color: this.gradient[0]
|
|
186
|
+
};
|
|
187
|
+
}
|
|
178
188
|
return {};
|
|
179
189
|
},
|
|
190
|
+
applyGradient() {
|
|
191
|
+
if (this.gradient.length && this.data.length) {
|
|
192
|
+
// Applying a gradient a constant line will cause it to not render,
|
|
193
|
+
// so skip the gradient if all values are equal.
|
|
194
|
+
const [, firstValue] = this.data[0];
|
|
195
|
+
return this.data.some(_ref => {
|
|
196
|
+
let [, value] = _ref;
|
|
197
|
+
return firstValue !== value;
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
return false;
|
|
201
|
+
},
|
|
180
202
|
lastYValue() {
|
|
203
|
+
if (!this.willShowLastYValue) return undefined;
|
|
181
204
|
const latestEntry = this.data.slice(-1)[0];
|
|
182
205
|
return latestEntry[1];
|
|
183
206
|
},
|
|
@@ -214,10 +237,10 @@ var script = {
|
|
|
214
237
|
// This function is called any time the axis pointer is changed (the black bubble showing which
|
|
215
238
|
// point on the line is selected). Note that it will not trigger if the axis pointer is removed,
|
|
216
239
|
// only when it changes from one point to another or is shown for the first time.
|
|
217
|
-
generateTooltip(
|
|
240
|
+
generateTooltip(_ref2) {
|
|
218
241
|
let {
|
|
219
242
|
seriesData = []
|
|
220
|
-
} =
|
|
243
|
+
} = _ref2;
|
|
221
244
|
this.tooltip.show = false;
|
|
222
245
|
|
|
223
246
|
// seriesData is an array of nearby data point coordinates
|