antvis / antvis/G2Plot

设置波形颜色为渐变色的话,有些是渐变色有些就是纯色

Open
#3,711 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

import { Liquid } from '@antv/g2plot';

const liquidPlot = new Liquid('container', {
percent: 0.25,
outline: {
border: 4,
distance: 8,
},
wave: {
count:8,
length: 128,
},
liquidStyle: {
"fill": "l(180) 0:#B4EC51 1:#429321 1:#B4EC51",
"stroke": "l(90) 0.01:#61a8ff 0.82:rgba(28, 129, 255, 0) 0.08:rgba(28, 129, 255, 0.75)",
"show": true,
"shadowColor": "#1c47ff",
"shadowBlur": 36,
"shadowOffsetX": 0,
"shadowOffsetY": 0
}
});
liquidPlot.render();
这是我的代码,fill设置为渐变色,但实际上看着是纯色

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue from the provided Liquid example, focusing on the liquidStyle fill and stroke gradient values. Start at the Liquid entry point and trace how these styles are applied to the waves; done means the configured gradient renders consistently rather than appearing as a solid color.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.