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

vue2 使用动态水滴图,出现占用CPU 和 GPU资源过大 #178

Open
chiyandetaotie opened this issue Jan 5, 2024 · 0 comments
Open

Comments

@chiyandetaotie
Copy link

我在vue2项目中使用动态水滴图,发现占用CPU和GPU资源过大,浏览器卡顿,但是不想使用静态的水滴图,我应该如何做?

var option = {
          series: [{
            type: 'liquidFill',
            radius: '80%',
            shape: 'circle',
            data: [
              {
                'name': 'XXX',
                'value': cpuTimeRemainingRate
              },
              0.5,
            ],
            amplitude: '5%',
            outline: {
              itemStyle: {
                borderWidth: 5,
                borderColor: '#156ACF',
              }

            }, 
            backgroundStyle: {
              borderColor: '#156ACF',
              borderWidth: 1,
              shadowColor: 'rgba(0, 0, 0, 0.4)',
              shadowBlur: 20,
            },

            label:{
              show: true,
              normal:{
                position:['50%','40%'],
                formatter: function(param) {
                  return param.name + '\n' + (param.value * 100).toFixed(2) + '%';
                },
                textStyle:{
                    fontSize: 12 
                }
              }
            },
          }],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant