hefeihvac_java/node_modules/echarts-gl/lib/chart/lines3D/Lines3DSeries.js

48 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-04-07 18:15:00 +08:00
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
}
}
});