question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltip not showing after updating from v3.4.0

See original GitHub issue

Tooltip does not show anymore on graphs when data in NULL.

One-line summary [问题简述]

When I was using ecahrts 3.4.0 and I had a graph that was filled with null or undefined. it would show me a tooltip and I used the formatter to make it say N/A when the value is null or undefined.

Today I updated to the latest version (3.7.1) and realized that tooltips dont show anymore so I downgraded to 3.4.0, it was working again. I went up 1 version (3.5.0) and it was broke so its from that version that this happened.

I looked at the documentation again now to see if something is changed but I couldn’t find anything.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.5.0
  • Browser version [浏览器类型和版本]: Chrome 60
  • OS Version [操作系统类型和版本]: Window 10

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
title: {
        text: '',
        subtext: ''
    },
    tooltip: {
        show: true,
        trigger: 'axis',
        axisPointer: {
            show: true,
            type: 'cross',
            label: {
                show: true
            }
        },
        formatter: function (params) {
            console.log('value is ' + params); //THIS LINE DOES NOT RUN..
            let value = '';
            if(params[0].data === undefined || params[0].data === null) {
                value = 'N/A';
            } else {
                value = (params[0].data).toFixed(2);
            }
            let text = "<span style=\"color:" + params[0].color + "\">\u25CF</span> " + params[0].seriesName + ": " + value;
            return params[0].name + "<br />" + text;
        }
    },
    axisPointer: {
        show: true,
        type: 'line'
    },
    legend: {
        show: false
    },
    toolbox: {
        show: true,
        feature: {
            magicType: {
                show: true,
                title: {
                    line: 'Line',
                    bar: 'Bar'
                },
                type: ['line', 'bar']
            },
            restore: {
                show: true,
                title: "Restore"
            },
            saveAsImage: {
                show: true,
                title: "Save Image"
            }
        }
    },
    calculable: true,
    xAxis: [{
        type: 'category',
        boundaryGap: false,
        data: []
    }],
    yAxis: [{
        type: 'value',
        min: 0,
        max: 20
    }],
    series: [{
        name: 'TPS',
        type: 'line',
        smooth: true,
        itemStyle: {
            normal: {
                areaStyle: {
                    type: 'default'
                }
            }
        },
        data: []
    }]
}

Other comments [其他信息]

What the graph tooltip should look like: 3.4.0

What it looks like now: 3.5.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
torueckcommented, Apr 2, 2020

I had the same issue with the tooltip not showing up using echarts within a Vue project. After a while I realized that I have to import different components I make use of in the chart. Amongst these is the tooltip component. The following resolved the issue for me:

import ECharts from "vue-echarts";
import "echarts/lib/chart/scatter";
import "echarts/lib/component/dataZoom";
import "echarts/lib/component/tooltip"; // you need to import the tooltip component
0reactions
github-actions[bot]commented, Apr 9, 2022

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tooltip not showing after updating from v3.4.0 #6710 - GitHub
Today I updated to the latest version (3.7.1) and realized that tooltips dont show anymore so I downgraded to 3.4.0, it was working...
Read more >
Updating the tooltip content doesnt update because its ...
1 Answer 1 · Make sure title attribute and data-toggle attributes are present on the input element. Bind tooltip to input element itself....
Read more >
Tooltips - Bootstrap
The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element. Trigger the tooltip via JavaScript:...
Read more >
The venue isn't displayd in tooltip after upgrading The Events ...
Hi,. After we upgraded The Events Calendar plugin to version 6 the venue has disappeared from the tooltip. It was working perfectly in...
Read more >
TinyTooltip - Addons - World of Warcraft - CurseForge
Hi, the anchor is not really working when it's static, the tooltip doesn't show on the anchor, but on the bottom right, anyone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found