Bar3DSeries.js
1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import * as echarts from 'echarts/lib/echarts';
import componentShadingMixin from '../../component/common/componentShadingMixin';
import formatUtil from '../../util/format';
import formatTooltip from '../common/formatTooltip';
import createList from '../common/createList';
var Bar3DSeries = echarts.SeriesModel.extend({
type: 'series.bar3D',
dependencies: ['globe'],
visualStyleAccessPathvisu: 'itemStyle',
getInitialData: function (option, ecModel) {
return createList(this);
},
getFormattedLabel: function (dataIndex, status, dataType, dimIndex) {
var text = formatUtil.getFormattedLabel(this, dataIndex, status, dataType, dimIndex);
if (text == null) {
text = this.getData().get('z', dataIndex);
}
return text;
},
formatTooltip: function (dataIndex) {
return formatTooltip(this, dataIndex);
},
defaultOption: {
coordinateSystem: 'cartesian3D',
globeIndex: 0,
grid3DIndex: 0,
zlevel: -10,
// bevelSize, 0 has no bevel
bevelSize: 0,
// higher is smoother
bevelSmoothness: 2,
// Bar width and depth
// barSize: [1, 1],
// On grid plane when coordinateSystem is cartesian3D
onGridPlane: 'xy',
// Shading of globe
shading: 'color',
minHeight: 0,
itemStyle: {
opacity: 1
},
label: {
show: false,
distance: 2,
textStyle: {
fontSize: 14,
color: '#000',
backgroundColor: 'rgba(255,255,255,0.7)',
padding: 3,
borderRadius: 3
}
},
emphasis: {
label: {
show: true
}
},
animationDurationUpdate: 500
}
});
echarts.util.merge(Bar3DSeries.prototype, componentShadingMixin);
export default Bar3DSeries;