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

水波图内存泄露的问题,不定时会出现,最严重的时候会导致浏览器直接挂掉 #163

Open
GuoSongGit opened this issue Dec 2, 2022 · 0 comments

Comments

@GuoSongGit
Copy link

const data = [
{
value: value,
// direction: left, //指定波浪的移动方向'left' 或 'right', 'none' 表示静止。
itemStyle: {
color: '#eeeeee',
},
},
{
value: value,
// direction: left, //指定波浪的移动方向'left' 或 'right', 'none' 表示静止。
itemStyle: {
color: setting.color.generationOverview + '2d',
},
},
{
value: value,
// direction: left, //指定波浪的移动方向'left' 或 'right', 'none' 表示静止。
itemStyle: {
color: setting.color.generationOverview,
},
},
];
const option = {
title: {
text: titleText,
textStyle: {
fontSize: 22,
fontWeight: 'bold',
color: 'rgb(0, 0, 0)',
lineHeight: 22,
rich: {
a: {
fontSize: 22,
fontWeight: 'normal',
color: 'rgba(0, 0, 0, .7)',
},
},
},
x: 'center',
y: '40%',
},

		series: [
			{
				type: 'liquidFill',
				radius: '96%',
				center: ['50%', '50%'],
				amplitude: 100, // 改变波的振幅
				//  shape: 'roundRect',
				data: data,
				backgroundStyle: {
					color: '#fff',
				},
				// 外边框
				outline: {
					borderDistance: 0,
					itemStyle: {
						borderWidth: 2,
						borderColor: {
							type: 'linear',
							x: 0,
							y: 0,
							x2: 0,
							y2: 1,
							colorStops: [
								{
									offset: 0,
									color: setting.color.generationOverview,
								},
								{
									offset: 1,
									color: setting.color.generationOverview,
								},
							],
							globalCoord: false,
						},
					},
				},
				label: {
					formatter: '',
				},
				itemStyle: {
					// 水波渐变色
					color: {
						type: 'linear',
						x: 0,
						y: 0,
						x2: 0,
						y2: 1,
						colorStops: [
							{
								offset: 1,
								color: 'rgba(58, 71, 212, 0)',
							},
							{
								offset: 0,
								color: 'rgba(31, 222, 225, 1)',
							},
						],
						globalCoord: false,
					},
					shadowBlur: 0,
					shadowColor: 'white',
				},
			},
		],
	};
	chart?.setOptions(option);
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