Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treemap Blinking #10521

Closed
hemantITT opened this issue May 22, 2019 · 11 comments · Fixed by #10644, OpenTMI/opentmi-default-gui#32 or DeviaVir/zenbot#2011 · May be fixed by dyna-dot/iClient-JavaScript-s#1
Closed

Treemap Blinking #10521

hemantITT opened this issue May 22, 2019 · 11 comments · Fixed by #10644, OpenTMI/opentmi-default-gui#32 or DeviaVir/zenbot#2011 · May be fixed by dyna-dot/iClient-JavaScript-s#1
Assignees
Labels
bug en This issue is in English topic: treemap
Milestone

Comments

@hemantITT
Copy link

Version

4.2.1

Steps to reproduce

OS: MacOS
ScreenSize: 27inch
Browser: Chrome

  1. there is large number of data for TreeMap. 2) Use below similar settings. 3) Treemap is used same as demo: https://ecomfe.github.io/echarts-examples/public/editor.html?c=treemap-show-parent

{
name: 'Main',
type: 'treemap',
// width: '98%',
// height: '95%',
// left: 30,
roam: false,
visibleMin: 300,

                label: {
                    show: true,
                    color: fontColor,
                    position: 'absolute',
                    formatter: function (info) {
                        var labelData = info.data.labels;
                        var labelValueArr = [];
                        if(labelData !== undefined) {
                            Object.keys(labelData).forEach(function (label) {
                                var labelVal = '';
                                //Check lable value is not null or undefined.If undefined then keep blank.
                                if(util.nullCheck(labelData[label])) {
                                    labelVal = labelData[label];
                                }

                                if(label === 'guest') {
                                    labelValueArr.push(labelVal);
                                } else if(label === 'stand') {
                                    label = 'Location';
                                    labelValueArr.push(label   ':'   labelVal);
                                } else {
                                    labelValueArr.push(label   ':'   labelVal);
                                }
                            });
                        }
                        return labelValueArr.join('\n');
                    },
                },
                upperLabel: {
                    normal: {
                        show: true,
                        height: 30
                    }
                },
                itemStyle: {
                    normal: {
                        borderColor: '#fff'
                    }
                },
                levels: $scope.levelOption,
                data: $scope.treemapData
            }

What is expected?

Treemap should be displayed properly

What is actually happening?

Treemap result is displayed but when mouse is hovered on parent label then all the items of treemap go invisible


It only happens on large data

@echarts-bot
Copy link

echarts-bot bot commented May 22, 2019

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for-help labels May 22, 2019
@hemantITT
Copy link
Author

When mouse hovered on label :

Screen Shot 2019-05-22 at 3 00 52 PM

When the treemap is loaded
Screen Shot 2019-05-22 at 3 03 32 PM

@Ovilia
Copy link
Contributor

Ovilia commented May 23, 2019

Please provide a working demo as simple as possible here: https://jsfiddle.net/ovilia/n6xc4df3/

@Ovilia Ovilia added missing-demo The author should provide a demo. waiting-for-author and removed waiting-for-help labels May 23, 2019
@hemantITT
Copy link
Author

Hi could not save into above given url. I have created a new one.
https://jsfiddle.net/hemantss/uwh2543p/2/

@Ovilia Ovilia removed missing-demo The author should provide a demo. pending We are not sure about whether this is a bug/new feature. waiting-for-author labels May 24, 2019
@hemantITT
Copy link
Author

Hi Ovilia please do you have any update for this issue.

@Ovilia
Copy link
Contributor

Ovilia commented Jun 6, 2019

@susiwen8 Could you help with this issue?

@susiwen8
Copy link
Contributor

susiwen8 commented Jun 6, 2019

@Ovilia Sure, challenge accepted.

@susiwen8
Copy link
Contributor

susiwen8 commented Jun 8, 2019

https://github.com/apache/incubator-echarts/blob/master/src/echarts.js#L1666
https://github.com/apache/incubator-echarts/blob/master/src/model/globalDefault.js#L78
https://github.com/ecomfe/zrender/blob/master/src/Painter.js#L336
Threshold value is 3000, but data count is lager than 3000, that led the zlevel of hoverlayer will be 10000, which will cover whole section, and that's why we saw 'blink'.
Obviously hoverLayerThreshold is for optimization reason, for this particular case, 3000 is not satisfied, but finally hoverLayerThreshold value need further discussion. @Ovilia @100pah

@Ovilia
Copy link
Contributor

Ovilia commented Jun 10, 2019

@susiwen8 Nice job for finding out the reason! Although I don't think it is wise to change progressiveThreshold to be Infinity in the source code. Even it is the correct way to fix this demo, it should be changed in user code rather than source code. @100pah Please have a look.

@100pah
Copy link
Member

100pah commented Jun 10, 2019

@hemantITT

As @susiwen8 said, please set

option: {
     hoverLayerThreshold: Infinity,
     series: { 
          ...
     }
}

to resolve this problem.

And the default hoverLayerThreshold of treemap will be fixed soon.

@hemantITT
Copy link
Author

Thank you for fixing this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment