Lines3DSeries.js
1.4 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
import * as echarts from 'echarts/lib/echarts';
export default echarts.SeriesModel.extend({
type: 'series.lines3D',
dependencies: ['globe'],
visualStyleAccessPath: 'lineStyle',
visualDrawType: 'stroke',
getInitialData: function (option, ecModel) {
var lineData = new echarts.List(['value'], this);
lineData.hasItemOption = false;
lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) {
// dataItem is simply coords
if (dataItem instanceof Array) {
return NaN;
}
else {
lineData.hasItemOption = true;
var value = dataItem.value;
if (value != null) {
return value instanceof Array ? value[dimIndex] : value;
}
}
});
return lineData;
},
defaultOption: {
coordinateSystem: 'globe',
globeIndex: 0,
geo3DIndex: 0,
zlevel: -10,
polyline: false,
effect: {
show: false,
period: 4,
// Trail width
trailWidth: 4,
trailLength: 0.2,
spotIntensity: 6
},
silent: true,
// Support source-over, lighter
blendMode: 'source-over',
lineStyle: {
width: 1,
opacity: 0.5
// color
}
}
});