@gitlab/ui 32.33.0 → 32.34.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 +7 -0
- package/dist/components/charts/area/area.js +3 -0
- package/dist/components/charts/bar/bar.js +2 -2
- package/dist/components/charts/chart/chart.js +20 -21
- package/dist/components/charts/legend/legend.js +1 -1
- package/dist/components/charts/tooltip/tooltip.js +1 -1
- package/dist/utils/charts/config.js +4 -3
- package/dist/utils/charts/mock_data.js +6 -3
- package/dist/utils/charts/theme.js +15 -9
- package/package.json +3 -3
- package/src/components/charts/area/area.vue +3 -0
- package/src/components/charts/bar/__snapshots__/bar.spec.js.snap +2 -2
- package/src/components/charts/bar/bar.vue +2 -2
- package/src/components/charts/chart/chart.spec.js +3 -1
- package/src/components/charts/chart/chart.vue +22 -20
- package/src/components/charts/column/__snapshots__/column_chart.spec.js.snap +6 -6
- package/src/components/charts/legend/legend.vue +1 -1
- package/src/components/charts/stacked_column/__snapshots__/stacked_column.spec.js.snap +26 -26
- package/src/components/charts/tooltip/tooltip.vue +1 -1
- package/src/utils/charts/config.js +3 -2
- package/src/utils/charts/mock_data.js +5 -2
- package/src/utils/charts/theme.js +14 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [32.34.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.33.0...v32.34.0) (2021-11-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **echarts:** update to echarts@5 ([c257e58](https://gitlab.com/gitlab-org/gitlab-ui/commit/c257e58e2dfadac7f4ba515f630272ea0a4039e7))
|
|
7
|
+
|
|
1
8
|
# [32.33.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.32.0...v32.33.0) (2021-11-04)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import echarts from 'echarts';
|
|
2
|
-
import { validRenderers, defaultHeight } from '../../../utils/charts/config';
|
|
1
|
+
import * as echarts from 'echarts';
|
|
2
|
+
import { validRenderers, defaultWidth, defaultHeight } from '../../../utils/charts/config';
|
|
3
3
|
import createTheme, { themeName } from '../../../utils/charts/theme';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
@@ -76,28 +76,27 @@ var script = {
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
|
|
79
|
-
mounted() {
|
|
80
|
-
|
|
81
|
-
this.$
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
async mounted() {
|
|
80
|
+
await this.$nextTick();
|
|
81
|
+
this.chart = echarts.init(this.$refs.chart, this.disableTheme ? null : themeName, {
|
|
82
|
+
renderer: this.renderer,
|
|
83
|
+
width: defaultWidth,
|
|
84
|
+
height: defaultHeight
|
|
85
|
+
});
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
if (this.groupId.length) {
|
|
88
|
+
this.chart.group = this.groupId;
|
|
89
|
+
echarts.connect(this.groupId);
|
|
90
|
+
}
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
this.chart.on('click', this.clickHandler);
|
|
93
|
+
/**
|
|
94
|
+
* Emitted after calling `echarts.init`
|
|
95
|
+
*/
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
});
|
|
100
|
-
/* eslint-enable */
|
|
97
|
+
this.$emit('created', this.chart);
|
|
98
|
+
this.draw();
|
|
99
|
+
this.setChartSize();
|
|
101
100
|
},
|
|
102
101
|
|
|
103
102
|
beforeDestroy() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import echarts from 'echarts';
|
|
1
|
+
import * as echarts from 'echarts';
|
|
2
2
|
import { defaultFontSize } from '../../../utils/charts/config';
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_CURRENT_TEXT, LEGEND_MIN_TEXT, LEGEND_MAX_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '../../../utils/charts/constants';
|
|
4
4
|
import { engineeringNotation, average } from '../../../utils/number_utils';
|
|
@@ -13,6 +13,7 @@ const blue500 = '#1f75cb';
|
|
|
13
13
|
const defaultAreaOpacity = 0.2;
|
|
14
14
|
const defaultFontSize = 12;
|
|
15
15
|
const defaultHeight = 400;
|
|
16
|
+
const defaultWidth = 300;
|
|
16
17
|
const validRenderers = ['canvas', 'svg'];
|
|
17
18
|
const axes = {
|
|
18
19
|
name: 'Value',
|
|
@@ -441,8 +442,8 @@ const generateBarSeries = ({
|
|
|
441
442
|
yAxisIndex,
|
|
442
443
|
itemStyle: {
|
|
443
444
|
color: hexToRgba(color, 0.2),
|
|
444
|
-
|
|
445
|
-
|
|
445
|
+
borderColor: color,
|
|
446
|
+
borderWidth: 1
|
|
446
447
|
},
|
|
447
448
|
emphasis: {
|
|
448
449
|
itemStyle: {
|
|
@@ -526,4 +527,4 @@ var config = {
|
|
|
526
527
|
};
|
|
527
528
|
|
|
528
529
|
export default config;
|
|
529
|
-
export { annotationsYAxisCoords, axes, dataZoomAdjustments, defaultAreaOpacity, defaultFontSize, defaultHeight, generateAnnotationSeries, generateBarSeries, generateLineSeries, getAnnotationsConfig, getDataZoomConfig, getDefaultTooltipContent, getThresholdConfig, getToolboxConfig, grid, gridWithSecondaryYAxis, lineStyle, mergeAnnotationAxisToOptions, mergeSeriesToOptions, parseAnnotations, symbolSize, validRenderers, xAxis, yAxis };
|
|
530
|
+
export { annotationsYAxisCoords, axes, dataZoomAdjustments, defaultAreaOpacity, defaultFontSize, defaultHeight, defaultWidth, generateAnnotationSeries, generateBarSeries, generateLineSeries, getAnnotationsConfig, getDataZoomConfig, getDefaultTooltipContent, getThresholdConfig, getToolboxConfig, grid, gridWithSecondaryYAxis, lineStyle, mergeAnnotationAxisToOptions, mergeSeriesToOptions, parseAnnotations, symbolSize, validRenderers, xAxis, yAxis };
|
|
@@ -39,7 +39,10 @@ const mockDefaultChartOptions = {
|
|
|
39
39
|
},
|
|
40
40
|
axisPointer: {
|
|
41
41
|
show: true,
|
|
42
|
-
label: {}
|
|
42
|
+
label: {},
|
|
43
|
+
lineStyle: {
|
|
44
|
+
type: 'solid'
|
|
45
|
+
}
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
yAxis: {
|
|
@@ -182,8 +185,8 @@ const mockDefaultBarChartConfig = {
|
|
|
182
185
|
yAxisIndex: 0,
|
|
183
186
|
itemStyle: {
|
|
184
187
|
color: hexToRgba(color, 0.2),
|
|
185
|
-
|
|
186
|
-
|
|
188
|
+
borderColor: color,
|
|
189
|
+
borderWidth: 1
|
|
187
190
|
},
|
|
188
191
|
emphasis: {
|
|
189
192
|
itemStyle: {
|
|
@@ -63,15 +63,14 @@ const axes = {
|
|
|
63
63
|
margin: 8,
|
|
64
64
|
show: true,
|
|
65
65
|
color: gray600,
|
|
66
|
-
|
|
67
|
-
color: gray600
|
|
68
|
-
}
|
|
66
|
+
hideOverlap: true
|
|
69
67
|
},
|
|
70
68
|
axisLine: {
|
|
71
69
|
show: false
|
|
72
70
|
},
|
|
73
71
|
axisPointer: {
|
|
74
72
|
lineStyle: {
|
|
73
|
+
type: 'solid',
|
|
75
74
|
color: gray600
|
|
76
75
|
},
|
|
77
76
|
label: {
|
|
@@ -131,6 +130,7 @@ const createTheme = (options = {}) => ({
|
|
|
131
130
|
dataZoom: {
|
|
132
131
|
borderColor: 'transparent',
|
|
133
132
|
filterMode: 'none',
|
|
133
|
+
brushSelect: false,
|
|
134
134
|
dataBackground: {
|
|
135
135
|
lineStyle: {
|
|
136
136
|
width: 2,
|
|
@@ -139,14 +139,18 @@ const createTheme = (options = {}) => ({
|
|
|
139
139
|
},
|
|
140
140
|
// render unfilled zoom-graph if the series is a line chart without area styles
|
|
141
141
|
// more details: https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2364#note_666637306
|
|
142
|
-
areaStyle: isLineChartWithoutArea(options) ? null
|
|
142
|
+
areaStyle: isLineChartWithoutArea(options) ? {} // Use empty object instead of null, see https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2185#note_707711029 for more context
|
|
143
|
+
: {
|
|
143
144
|
color: gray50,
|
|
144
145
|
opacity: 1
|
|
145
146
|
}
|
|
146
147
|
},
|
|
147
148
|
fillerColor: hexToRgba(gray200, 0.23),
|
|
148
149
|
handleIcon: scrollHandleSvgPath,
|
|
149
|
-
|
|
150
|
+
handleStyle: {
|
|
151
|
+
borderColor: 'transparent',
|
|
152
|
+
color: gray500
|
|
153
|
+
},
|
|
150
154
|
handleSize: '50%',
|
|
151
155
|
labelFormatter: () => null,
|
|
152
156
|
textStyle: {
|
|
@@ -157,14 +161,16 @@ const createTheme = (options = {}) => ({
|
|
|
157
161
|
top: '-5',
|
|
158
162
|
left: 'center',
|
|
159
163
|
itemSize: 14,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
borderWidth: 0,
|
|
163
|
-
emphasis: {
|
|
164
|
+
emphasis: {
|
|
165
|
+
iconStyle: {
|
|
164
166
|
borderWidth: 0,
|
|
165
167
|
color: gray700
|
|
166
168
|
}
|
|
167
169
|
},
|
|
170
|
+
iconStyle: {
|
|
171
|
+
color: gray200,
|
|
172
|
+
borderWidth: 0
|
|
173
|
+
},
|
|
168
174
|
itemGap: 8,
|
|
169
175
|
feature: {
|
|
170
176
|
dataZoom: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.34.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"bootstrap-vue": "2.20.1",
|
|
62
62
|
"copy-to-clipboard": "^3.0.8",
|
|
63
63
|
"dompurify": "^2.3.3",
|
|
64
|
-
"echarts": "^
|
|
64
|
+
"echarts": "^5.2.1",
|
|
65
65
|
"highlight.js": "^10.6.0",
|
|
66
66
|
"js-beautify": "^1.8.8",
|
|
67
67
|
"lodash": "^4.17.20",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@babel/preset-env": "^7.10.2",
|
|
85
85
|
"@gitlab/eslint-plugin": "9.4.0",
|
|
86
86
|
"@gitlab/stylelint-config": "2.6.0",
|
|
87
|
-
"@gitlab/svgs": "1.
|
|
87
|
+
"@gitlab/svgs": "1.220.0",
|
|
88
88
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
89
89
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
90
90
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import echarts from 'echarts';
|
|
2
|
+
import * as echarts from 'echarts';
|
|
3
3
|
import Chart from './chart.vue';
|
|
4
4
|
import createTheme from '~/utils/charts/theme';
|
|
5
5
|
|
|
@@ -35,6 +35,8 @@ describe('chart component', () => {
|
|
|
35
35
|
themeName,
|
|
36
36
|
{
|
|
37
37
|
renderer: wrapper.props().renderer,
|
|
38
|
+
width: 300,
|
|
39
|
+
height: 400,
|
|
38
40
|
}
|
|
39
41
|
);
|
|
40
42
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import echarts from 'echarts';
|
|
3
|
-
import { defaultHeight, validRenderers } from '../../../utils/charts/config';
|
|
2
|
+
import * as echarts from 'echarts';
|
|
3
|
+
import { defaultHeight, defaultWidth, validRenderers } from '../../../utils/charts/config';
|
|
4
4
|
import createTheme, { themeName } from '../../../utils/charts/theme';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
@@ -66,25 +66,27 @@ export default {
|
|
|
66
66
|
echarts.registerTheme(themeName, createTheme(this.options));
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
mounted() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.chart.group = this.groupId;
|
|
77
|
-
echarts.connect(this.groupId);
|
|
78
|
-
}
|
|
79
|
-
this.chart.on('click', this.clickHandler);
|
|
80
|
-
/**
|
|
81
|
-
* Emitted after calling `echarts.init`
|
|
82
|
-
*/
|
|
83
|
-
this.$emit('created', this.chart);
|
|
84
|
-
this.draw();
|
|
85
|
-
this.setChartSize();
|
|
69
|
+
async mounted() {
|
|
70
|
+
await this.$nextTick();
|
|
71
|
+
|
|
72
|
+
this.chart = echarts.init(this.$refs.chart, this.disableTheme ? null : themeName, {
|
|
73
|
+
renderer: this.renderer,
|
|
74
|
+
width: defaultWidth,
|
|
75
|
+
height: defaultHeight,
|
|
86
76
|
});
|
|
87
|
-
|
|
77
|
+
|
|
78
|
+
if (this.groupId.length) {
|
|
79
|
+
this.chart.group = this.groupId;
|
|
80
|
+
echarts.connect(this.groupId);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
this.chart.on('click', this.clickHandler);
|
|
84
|
+
/**
|
|
85
|
+
* Emitted after calling `echarts.init`
|
|
86
|
+
*/
|
|
87
|
+
this.$emit('created', this.chart);
|
|
88
|
+
this.draw();
|
|
89
|
+
this.setChartSize();
|
|
88
90
|
},
|
|
89
91
|
beforeDestroy() {
|
|
90
92
|
this.chart.off('click', this.clickHandler);
|
|
@@ -50,8 +50,8 @@ Object {
|
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
"itemStyle": Object {
|
|
53
|
-
"
|
|
54
|
-
"
|
|
53
|
+
"borderColor": "#5772ff",
|
|
54
|
+
"borderWidth": 1,
|
|
55
55
|
"color": "rgba(87, 114, 255, 0.2)",
|
|
56
56
|
},
|
|
57
57
|
"name": "Full",
|
|
@@ -240,8 +240,8 @@ Object {
|
|
|
240
240
|
},
|
|
241
241
|
},
|
|
242
242
|
"itemStyle": Object {
|
|
243
|
-
"
|
|
244
|
-
"
|
|
243
|
+
"borderColor": "#5772ff",
|
|
244
|
+
"borderWidth": 1,
|
|
245
245
|
"color": "rgba(87, 114, 255, 0.2)",
|
|
246
246
|
},
|
|
247
247
|
"name": "Full",
|
|
@@ -271,8 +271,8 @@ Object {
|
|
|
271
271
|
},
|
|
272
272
|
},
|
|
273
273
|
"itemStyle": Object {
|
|
274
|
-
"
|
|
275
|
-
"
|
|
274
|
+
"borderColor": "#b24800",
|
|
275
|
+
"borderWidth": 1,
|
|
276
276
|
"color": "rgba(178, 72, 0, 0.2)",
|
|
277
277
|
},
|
|
278
278
|
"name": "Secondary 1",
|
|
@@ -34,8 +34,8 @@ Object {
|
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
"itemStyle": Object {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"borderColor": "#FFFHHH",
|
|
38
|
+
"borderWidth": 1,
|
|
39
39
|
"color": "rgba(255, undefined, undefined, 0.2)",
|
|
40
40
|
},
|
|
41
41
|
"name": "Fun 1",
|
|
@@ -78,8 +78,8 @@ Object {
|
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
80
|
"itemStyle": Object {
|
|
81
|
-
"
|
|
82
|
-
"
|
|
81
|
+
"borderColor": "#FFFJJJ",
|
|
82
|
+
"borderWidth": 1,
|
|
83
83
|
"color": "rgba(255, undefined, undefined, 0.2)",
|
|
84
84
|
},
|
|
85
85
|
"name": "Fun 2",
|
|
@@ -122,8 +122,8 @@ Object {
|
|
|
122
122
|
},
|
|
123
123
|
},
|
|
124
124
|
"itemStyle": Object {
|
|
125
|
-
"
|
|
126
|
-
"
|
|
125
|
+
"borderColor": "#FFFIII",
|
|
126
|
+
"borderWidth": 1,
|
|
127
127
|
"color": "rgba(255, undefined, undefined, 0.2)",
|
|
128
128
|
},
|
|
129
129
|
"name": "Fun 3",
|
|
@@ -166,8 +166,8 @@ Object {
|
|
|
166
166
|
},
|
|
167
167
|
},
|
|
168
168
|
"itemStyle": Object {
|
|
169
|
-
"
|
|
170
|
-
"
|
|
169
|
+
"borderColor": "#FFFKKK",
|
|
170
|
+
"borderWidth": 1,
|
|
171
171
|
"color": "rgba(255, undefined, undefined, 0.2)",
|
|
172
172
|
},
|
|
173
173
|
"name": "Fun 4",
|
|
@@ -290,8 +290,8 @@ Object {
|
|
|
290
290
|
},
|
|
291
291
|
},
|
|
292
292
|
"itemStyle": Object {
|
|
293
|
-
"
|
|
294
|
-
"
|
|
293
|
+
"borderColor": "#5772ff",
|
|
294
|
+
"borderWidth": 1,
|
|
295
295
|
"color": "rgba(87, 114, 255, 0.2)",
|
|
296
296
|
},
|
|
297
297
|
"name": "Fun 1",
|
|
@@ -334,8 +334,8 @@ Object {
|
|
|
334
334
|
},
|
|
335
335
|
},
|
|
336
336
|
"itemStyle": Object {
|
|
337
|
-
"
|
|
338
|
-
"
|
|
337
|
+
"borderColor": "#b24800",
|
|
338
|
+
"borderWidth": 1,
|
|
339
339
|
"color": "rgba(178, 72, 0, 0.2)",
|
|
340
340
|
},
|
|
341
341
|
"name": "Fun 2",
|
|
@@ -378,8 +378,8 @@ Object {
|
|
|
378
378
|
},
|
|
379
379
|
},
|
|
380
380
|
"itemStyle": Object {
|
|
381
|
-
"
|
|
382
|
-
"
|
|
381
|
+
"borderColor": "#0094b6",
|
|
382
|
+
"borderWidth": 1,
|
|
383
383
|
"color": "rgba(0, 148, 182, 0.2)",
|
|
384
384
|
},
|
|
385
385
|
"name": "Fun 3",
|
|
@@ -422,8 +422,8 @@ Object {
|
|
|
422
422
|
},
|
|
423
423
|
},
|
|
424
424
|
"itemStyle": Object {
|
|
425
|
-
"
|
|
426
|
-
"
|
|
425
|
+
"borderColor": "#366800",
|
|
426
|
+
"borderWidth": 1,
|
|
427
427
|
"color": "rgba(54, 104, 0, 0.2)",
|
|
428
428
|
},
|
|
429
429
|
"name": "Fun 4",
|
|
@@ -651,8 +651,8 @@ Object {
|
|
|
651
651
|
},
|
|
652
652
|
},
|
|
653
653
|
"itemStyle": Object {
|
|
654
|
-
"
|
|
655
|
-
"
|
|
654
|
+
"borderColor": "#5772ff",
|
|
655
|
+
"borderWidth": 1,
|
|
656
656
|
"color": "rgba(87, 114, 255, 0.2)",
|
|
657
657
|
},
|
|
658
658
|
"name": "Fun 1",
|
|
@@ -695,8 +695,8 @@ Object {
|
|
|
695
695
|
},
|
|
696
696
|
},
|
|
697
697
|
"itemStyle": Object {
|
|
698
|
-
"
|
|
699
|
-
"
|
|
698
|
+
"borderColor": "#b24800",
|
|
699
|
+
"borderWidth": 1,
|
|
700
700
|
"color": "rgba(178, 72, 0, 0.2)",
|
|
701
701
|
},
|
|
702
702
|
"name": "Fun 2",
|
|
@@ -739,8 +739,8 @@ Object {
|
|
|
739
739
|
},
|
|
740
740
|
},
|
|
741
741
|
"itemStyle": Object {
|
|
742
|
-
"
|
|
743
|
-
"
|
|
742
|
+
"borderColor": "#0094b6",
|
|
743
|
+
"borderWidth": 1,
|
|
744
744
|
"color": "rgba(0, 148, 182, 0.2)",
|
|
745
745
|
},
|
|
746
746
|
"name": "Fun 3",
|
|
@@ -783,8 +783,8 @@ Object {
|
|
|
783
783
|
},
|
|
784
784
|
},
|
|
785
785
|
"itemStyle": Object {
|
|
786
|
-
"
|
|
787
|
-
"
|
|
786
|
+
"borderColor": "#366800",
|
|
787
|
+
"borderWidth": 1,
|
|
788
788
|
"color": "rgba(54, 104, 0, 0.2)",
|
|
789
789
|
},
|
|
790
790
|
"name": "Fun 4",
|
|
@@ -827,8 +827,8 @@ Object {
|
|
|
827
827
|
},
|
|
828
828
|
},
|
|
829
829
|
"itemStyle": Object {
|
|
830
|
-
"
|
|
831
|
-
"
|
|
830
|
+
"borderColor": "#950943",
|
|
831
|
+
"borderWidth": 1,
|
|
832
832
|
"color": "rgba(149, 9, 67, 0.2)",
|
|
833
833
|
},
|
|
834
834
|
"name": "Secondary 1",
|
|
@@ -12,6 +12,7 @@ import { ANNOTATIONS_SERIES_NAME, arrowSymbol, CHART_TYPE_BAR, CHART_TYPE_LINE }
|
|
|
12
12
|
export const defaultAreaOpacity = 0.2;
|
|
13
13
|
export const defaultFontSize = 12;
|
|
14
14
|
export const defaultHeight = 400;
|
|
15
|
+
export const defaultWidth = 300;
|
|
15
16
|
export const validRenderers = ['canvas', 'svg'];
|
|
16
17
|
|
|
17
18
|
export const axes = {
|
|
@@ -433,8 +434,8 @@ export const generateBarSeries = ({
|
|
|
433
434
|
yAxisIndex,
|
|
434
435
|
itemStyle: {
|
|
435
436
|
color: hexToRgba(color, 0.2),
|
|
436
|
-
|
|
437
|
-
|
|
437
|
+
borderColor: color,
|
|
438
|
+
borderWidth: 1,
|
|
438
439
|
},
|
|
439
440
|
emphasis: {
|
|
440
441
|
itemStyle: {
|
|
@@ -43,6 +43,9 @@ export const mockDefaultChartOptions = {
|
|
|
43
43
|
axisPointer: {
|
|
44
44
|
show: true,
|
|
45
45
|
label: {},
|
|
46
|
+
lineStyle: {
|
|
47
|
+
type: 'solid',
|
|
48
|
+
},
|
|
46
49
|
},
|
|
47
50
|
},
|
|
48
51
|
yAxis: {
|
|
@@ -204,8 +207,8 @@ export const mockDefaultBarChartConfig = {
|
|
|
204
207
|
yAxisIndex: 0,
|
|
205
208
|
itemStyle: {
|
|
206
209
|
color: hexToRgba(color, 0.2),
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
borderColor: color,
|
|
211
|
+
borderWidth: 1,
|
|
209
212
|
},
|
|
210
213
|
emphasis: {
|
|
211
214
|
itemStyle: {
|
|
@@ -105,15 +105,14 @@ const axes = {
|
|
|
105
105
|
margin: 8,
|
|
106
106
|
show: true,
|
|
107
107
|
color: gray600,
|
|
108
|
-
|
|
109
|
-
color: gray600,
|
|
110
|
-
},
|
|
108
|
+
hideOverlap: true,
|
|
111
109
|
},
|
|
112
110
|
axisLine: {
|
|
113
111
|
show: false,
|
|
114
112
|
},
|
|
115
113
|
axisPointer: {
|
|
116
114
|
lineStyle: {
|
|
115
|
+
type: 'solid',
|
|
117
116
|
color: gray600,
|
|
118
117
|
},
|
|
119
118
|
label: {
|
|
@@ -175,6 +174,7 @@ const createTheme = (options = {}) => ({
|
|
|
175
174
|
dataZoom: {
|
|
176
175
|
borderColor: 'transparent',
|
|
177
176
|
filterMode: 'none',
|
|
177
|
+
brushSelect: false,
|
|
178
178
|
dataBackground: {
|
|
179
179
|
lineStyle: {
|
|
180
180
|
width: 2,
|
|
@@ -184,7 +184,7 @@ const createTheme = (options = {}) => ({
|
|
|
184
184
|
// render unfilled zoom-graph if the series is a line chart without area styles
|
|
185
185
|
// more details: https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2364#note_666637306
|
|
186
186
|
areaStyle: isLineChartWithoutArea(options)
|
|
187
|
-
? null
|
|
187
|
+
? {} // Use empty object instead of null, see https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2185#note_707711029 for more context
|
|
188
188
|
: {
|
|
189
189
|
color: gray50,
|
|
190
190
|
opacity: 1,
|
|
@@ -192,7 +192,10 @@ const createTheme = (options = {}) => ({
|
|
|
192
192
|
},
|
|
193
193
|
fillerColor: hexToRgba(gray200, 0.23),
|
|
194
194
|
handleIcon: scrollHandleSvgPath,
|
|
195
|
-
|
|
195
|
+
handleStyle: {
|
|
196
|
+
borderColor: 'transparent',
|
|
197
|
+
color: gray500,
|
|
198
|
+
},
|
|
196
199
|
handleSize: '50%',
|
|
197
200
|
labelFormatter: () => null,
|
|
198
201
|
textStyle: {
|
|
@@ -203,14 +206,16 @@ const createTheme = (options = {}) => ({
|
|
|
203
206
|
top: '-5',
|
|
204
207
|
left: 'center',
|
|
205
208
|
itemSize: 14,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
borderWidth: 0,
|
|
209
|
-
emphasis: {
|
|
209
|
+
emphasis: {
|
|
210
|
+
iconStyle: {
|
|
210
211
|
borderWidth: 0,
|
|
211
212
|
color: gray700,
|
|
212
213
|
},
|
|
213
214
|
},
|
|
215
|
+
iconStyle: {
|
|
216
|
+
color: gray200,
|
|
217
|
+
borderWidth: 0,
|
|
218
|
+
},
|
|
214
219
|
itemGap: 8,
|
|
215
220
|
feature: {
|
|
216
221
|
dataZoom: {
|