echarts-liquidfill
echarts-liquidfill copied to clipboard
水波图内存泄露的问题,不定时会出现,最严重的时候会导致浏览器直接挂掉
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);