echarts icon indicating copy to clipboard operation
echarts copied to clipboard

echart gl line3D 数据隔得太近线变成虚线了,怎解决呢

Open sdzhihao opened this issue 8 years ago • 4 comments

One-line summary [问题简述]

echart gl line3D 数据隔得太近线变成虚线了,怎解决呢

怎样能使先不虚化呢,求解

ECharts option [ECharts配置项]

var data = [];
// Parametric curve
for (var t = 0; t < 100; t +=1) {
    var x = t;
    var y = t;
    var z = 0;
    if(t%2==0){
       z = 1000;
    }
    data.push([x, y, z]);
}
console.log(data.length);

option = {
    tooltip: {},
    backgroundColor: '#fff',
    visualMap: {
        show: false,
        dimension: 2,
        min: 0,
        max: 30,
        inRange: {
            color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
        }
    },
    xAxis3D: {
        type: 'value'
    },
    yAxis3D: {
        type: 'value'
    },
    zAxis3D: {
        type: 'value'
    },
    grid3D: {
        viewControl: {
            projection: 'orthographic'
        }
    },
    series: [{
        type: 'line3D',
        data: data,
        lineStyle: {
            width: 4
        }
    }]
};


Other comments [其他信息]

image

sdzhihao avatar Dec 28 '17 08:12 sdzhihao

求解

sdzhihao avatar Dec 28 '17 08:12 sdzhihao

lineStyle width加粗线条怎么样

Mying666 avatar Jan 05 '18 07:01 Mying666

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 02 '20 03:04 stale[bot]

原因知道了,是因为数据点分布不均并且点与点之间的距离过大导致的。如果数据点分布均匀且点与点之间的距离合适,线是不会变细甚至变成虚线的。 解决方法是在数据上做文章。如果两个数据点之间距离大于某个值(自己根据实际情况设置),就插入点(在两点之间的直线上,具体多少个自己根据实际情况设置)。

shArpyYAo avatar Oct 15 '20 03:10 shArpyYAo