Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Echart.js charts isn't showing tooltip

I am using Echart.js library.

var echartLine = echarts.init(document.getElementById('myChart'), theme);

In echart option I add :

tooltip: {
                    show: true,
                    showContent: true,
                    alwaysShowContent: true,
                    triggerOn: 'mousemove',
                    trigger: 'axis',
                    axisPointer:
                        {
                            label: {
                                show: true,
                            }
                        }

                }, 

Tooltip don't appear. Image is bellow. enter image description here

like image 279
aleks.ru Avatar asked Oct 16 '25 11:10

aleks.ru


2 Answers

for visitors: do not use canvas as container, init your echarts with div instead, tooltips should show then.

like image 161
Weilory Avatar answered Oct 19 '25 00:10

Weilory


Change the option trigger: 'axis' to trigger: 'item' and it should work like a charm.

like image 41
async_soul Avatar answered Oct 19 '25 01:10

async_soul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!