Skip to content

Scatter plot在大量資料下用tooltip會有series消失 #8180

@mohsu

Description

@mohsu

One-line summary [问题简述]

scatter plot在資料點多時,會因為使用tooltip造成一條series消失(而且只發生在tooltip trigger: 'axis')
資料點大約有5萬筆(3 series合計),資料點少的時候不會發生這樣的情形,tooltip trigger是item的狀況下也不會有這樣的問題

另外echart.min.js不支持x-axis為時間的scatter plot,換成echart.js才有

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: echart 4.0.4
  • Browser version [浏览器类型和版本]: Chrome 65.0.3325.181
  • OS Version [操作系统类型和版本]: Windows 1709(16299.371)

Expected behaviour [期望结果]

原本有藍、粉紅兩條series
expected
tooltip出現後只剩一條(且不完整)
tooltip

ECharts option [ECharts配置项]

option = {
    axisPointer: {
            link: {xAxisIndex: 'all'},
             lineStyle: {
                     type: 'dashed'
             },
             },
                    tooltip: {
                        trigger: 'axis',
                  
                    }, //end of tooltip
                    animation: false, 
                    grid: [{
                        left: '5%',
                        right: '3%',
                        height: '60%',
                        z: 1
                    }, {
                        left: '5%',
                        right: '3%',
                        top: '78%',
                        height: '9%',
                        z: 2
                    }
                    ],
                    xAxis: [{
                        type: 'time',
                        scale: true,
                        show: false,
                        boundaryGap: false,
                        axisLine: {onZero: false},
                        min: new Date('{{ selectiondic.min_time }}'),
                        max: new Date('{{ selectiondic.max_time }}'),
                        axisLabel: {show: false},
                    }, {
                        type: 'time',
                        gridIndex: 1,
                        scale: true,
                        boundaryGap: false,
                        axisLine: {onZero: false},
                        axisTick: {show: false},
                        splitLine: {show: false},
                        axisLabel: {
                            formatter: function (value) {
                                return echarts.format.formatTime('hh:mm:ss', new Date(value)) + ' \n' + echarts.format.formatTime('dd-MM-yy', new Date(value));
                            }
                        },
                        min: new Date('{{ selectiondic.min_time }}'),
                        max: new Date('{{ selectiondic.max_time }}'),
                    }],
                    yAxis: [{
                        name: 'odds',
                        type: 'value',
                        scale: true,
                        axisLine: {onZero: false},
                        splitArea: {
                            show: true
                        }
                    }, {
                        type: 'value',
                        scale: true,
                        gridIndex: 1,
                        splitNumber: 2,
                        axisLine: {show: false},
                        axisTick: {show: false},
                        splitLine: {show: false},
                        axisLabel: {
                            show: false
                        },
                        splitArea: {
                            show: true
                        }
                    }],
                    series: [{{ selectiondic.echart_data | safe}}],
                    dataZoom: [{ //mouse
                        type: 'inside',
                        xAxisIndex: [0, 1]
                    }, { //slider
                        type: 'slider',
                        xAxisIndex: [0, 1],
                        bottom: 5,
                        showDataShadow: true,
                        showDetail: false
                    }],
                    toolbox: {
                        feature: {
                            restore: {
                                title: "restore",
                            },
                            saveAsImage: {
                                title: "saveImage"
                            }
                        }
                    },
}

Other comments [其他信息]

{{ variable }}為django變數
series: [{
type: 'scatter',
data: %s,
symbolSize: 4,
animation: false,
large: true,
largeThreshold: 3000,
}% getXYZ()]

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions