Skip to content

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

@chiyandetaotie

Description

@chiyandetaotie

我在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 
                }
              }
            },
          }],
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions